-1

既に作成したダウンロードにある txt ファイルにユーザー名とパスワードを書き込もうとしていますが、何も書き込まれず、プログラムが実行されるだけです。

def write_file(username, password):
    f = open("increpted_data.txt", 'w')
    data = username+' '+password
    f.write(data)
    f.close()

write_file("john", "doe")
4

1 に答える 1