既に作成したダウンロードにある txt ファイルにユーザー名とパスワードを書き込もうとしていますが、何も書き込まれず、プログラムが実行されるだけです。
def write_file(username, password):
f = open("increpted_data.txt", 'w')
data = username+' '+password
f.write(data)
f.close()
write_file("john", "doe")
既に作成したダウンロードにある txt ファイルにユーザー名とパスワードを書き込もうとしていますが、何も書き込まれず、プログラムが実行されるだけです。
def write_file(username, password):
f = open("increpted_data.txt", 'w')
data = username+' '+password
f.write(data)
f.close()
write_file("john", "doe")