Advertisement
pacho_the_python

adding_symbols_at_the_end_of_a_line

Nov 13th, 2023
590
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. new_line = ""
  2. with open('C:\\Users\\Pacho\\Desktop\\cam file.txt', 'r') as f:
  3.     for line in f:
  4.         new_line += line.strip() + " ;\n"
  5.     f.close()
  6.  
  7. with open('C:\\Users\\Pacho\\Desktop\\cam file.txt', 'w') as f:
  8.     f.write(new_line)
  9.     f.close()
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement