Advertisement
myLoveOnlyForYou

Untitled

Mar 11th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import re
  2. Input = open("input.txt", 'r')
  3. Output = open("output.txt", 'w')
  4.  
  5.  
  6. reg = "(?:[1-9](?:0)*)+(?:[+-/*](?:[1-9](?:0)*)+)*"
  7.  
  8. for a in Input:
  9. b = re.findall(r""+reg, a)
  10. for c in b:
  11. Output.write(c + '\n')
  12. Input.close()
  13. Output.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement