You are viewing a single comment's thread. Return to all comments →
My solution:
for _ in range(int(input())): line = input() while ' && ' in line or ' || ' in line: line = line.replace(" && ", " and ").replace(" || ", " or ") print(line)
No need to complicate things.
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 →
My solution:
No need to complicate things.