You are viewing a single comment's thread. Return to all comments →
import re N = int(input()) text = "\n".join(input() for _ in range(N)) print(re.sub(r'(?<=\s)&&(?=\s)', 'and', re.sub(r'(?<=\s)\|\|(?=\s)', 'or', text)))
Seems like cookies are disabled on this browser, please enable them to open this website
Regex Substitution
You are viewing a single comment's thread. Return to all comments →