Guest User

Untitled

a guest
Nov 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. a = open("1.txt","r+")
  2. b = open("2.txt","r+")
  3. for i in a.readlines():
  4. io=str(i)+"$"
  5. e = b.writelines(io)
  6.  
  7. a.close()
  8. b.close()
  9.  
  10. io = i.rstrip() + "$" + 'n'
  11.  
  12. with open("1.txt", "r") as inFile:
  13. with open("2.txt", "w") as outFile:
  14. for line in inFile:
  15. outFile.write(line.strip() + "$n")
  16.  
  17. a = open("1.txt","r+")
  18. b = open("2.txt","r+")
  19. for i in a.readlines():
  20. io=i[:-1] + "$n"
  21. e = b.write(io)
  22.  
  23. a.close()
  24. b.close()
Add Comment
Please, Sign In to add comment