Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- output_file = open('output1.txt', 'a')
- def get_lines():
- with open(sys.argv[1], 'r') as input_file:
- for line in input_file:
- yield line
- for line in get_lines():
- try:
- newline = int(line)
- except ValueError:
- output_file.write(line)
- pass
- output_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement