Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('C:/sample.txt','r')
- file = file.read()
- lines = file.split('\n')
- newfile = ''
- for line in lines:
- if line[-2:] != ' 0':
- newfile += line+'\n'
- file = open('C:/newfile.txt', 'w')
- file.write(newfile)
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement