Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- f = open('text.txt', 'r')
- for eachLine in f:
- string = ''
- string = re.sub(r'(?<= )&&(?= )','and',eachLine)
- string = re.sub(r'(?<= )\|\|(?= )','or',string)
- print string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement