Advertisement
182days

Text File Copier

May 10th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #copies the contents of one text file to another.
  2. import random
  3. f=open("alice.txt","r")
  4. start = input("Press the 'G' key to go!!!")
  5. if start == "g":
  6.     for x in range(0, 3666): #number of lines in the text file source
  7.         lines = open("alice.txt").read().splitlines()
  8.         myline =(f.readline())
  9.         g=open("alice_copy.txt","a")
  10.         g.write(str(myline) + "\n")
  11.         print(myline)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement