Advertisement
He4dShOt

Untitled

Dec 11th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. with open('file', 'r+') as f:
  2. ...     puppa = f.read().splitlines()
  3. ...     f.seek(0)
  4. ...     for w in puppa:
  5. ...             f.write(w.replace('text', 'new_text')+ '\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement