You are viewing a single comment's thread. Return to all comments →
import re,sys data = sys.stdin.read().splitlines() remaining = "\n".join(data[1:]) print(re.sub(r'(?<= )([&]{2}|[|]{2})(?= )',lambda x:"and" if x.group(1)=="&&" else "or",remaining))
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 →