+ 2
How can you be able to save user input into a file in python language
2 Answers
+ 1
with open(filename, "w") as f:
f.write(input());
0
if u want to save other inputs:
file = open("filename.txt", "r")
cont = file.read()
file.close()
file = open("newfile.txt", "w")
file.write(cont + ", " + input())
file.close()