Advertisement
182days

Printing Input

May 10th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import os
  2. input1 = input("write something interesting here")
  3. input2 = input("write something else...")
  4. file = open("testfile.txt", "w")
  5. file.write(input1 + "\n")
  6. file.write(input2 + "\n")
  7. file.close()
  8. while True:
  9.     print("print or quit?")
  10.     choice = input("what do you want to do?").lower()
  11.     if choice =="print":
  12.         os.startfile("C:/Users/Owner/Desktop/testfile.txt", "print")
  13.  
  14.     else:
  15.         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement