how to write code to take input for file in python code example
Example: how to write user input to a file in python
#Print User Input to A File
x = input("Enter blah : ")
y = open('C:\Users\USERNAME\Documents\Doc1.txt', 'w')
y.write(x)
#Convert text to binary and then write to file
x = input("Enter blah : ")
y = open('C:\Users\USERNAME\Documents\Doc1.txt', 'wb')
y.write(x)