1#Print User Input to A File
2x = input("Enter blah : ")
3y = open('C:\Users\USERNAME\Documents\Doc1.txt', 'w')
4y.write(x)
5
6#Convert text to binary and then write to file
7x = input("Enter blah : ")
8y = open('C:\Users\USERNAME\Documents\Doc1.txt', 'wb')
9y.write(x)