Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- Input = open("input.txt", 'r')
- Output = open("output.txt", 'w')
- reg = "(?:(?:[1-9][0-9]*[+*-][0-9]+)|(?:[/][1-9][0-9]*|[1-9][0-9]*))"
- for a in Input:
- b = re.findall(r""+reg, a)
- for c in b:
- Output.write(c + '\n')
- Input.close()
- Output.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement