You are viewing a single comment's thread. Return to all comments →
2 line code :
for _ in range(int(input())): print(re.sub(r'((?<=\s)&&(?=\s)|(?<=\s)\|\|(?=\s))',lambda x : 'and' if x.group() == '&&' else 'or',input()))
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 →
2 line code :