I am trying to create a file that just writes the user's name to a file. I have written:
def main():
f=open("name.txt","a")
name=input("name:")
f.writelines(name)
f.close()
main()
I am wondering what I am missing in order for this to work because it does not save into a text file. Additionally I am using append so I can run this program more than once and continuously add names to it.