• + 2 comments

    my solution: import re for i in range(int(input())): try: re.compile(input()) print(True) except re.error: print(False) but it is giving output as TRUE TRUE and hence failing the sample test case. Although i did solve it using python 2 can anyone help me with a pypy3 solution