Create Text Document (Python) [closed]
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center . Closed 7 years ago . Lets say I want to create a document out of user-inputted code, called spam.txt . Assuming I have the user input, say: input("Is Python Good? ") How can I save the text, that the user inputted, to a text file, and can one do this? f = open('file.txt','w')