Advertisement
zero_shubham1

solved

Oct 29th, 2015
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. import re
  2.  
  3.  
  4. f = open('text.txt', 'r')
  5. for eachLine in f:
  6. string = ''
  7. string = re.sub(r'(?<= )&&(?= )','and',eachLine)
  8. string = re.sub(r'(?<= )\|\|(?= )','or',string)
  9. print string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement