You are viewing a single comment's thread. Return to all comments →
Below code throws an runtime error on Pypy 2 and wrong answer in Python 3 version. Works fine on Pypy 3.
import re S = [] T = int(input()) for i in range(T): S.append(input()) for s in S: try: re.compile(s) print("True") except: print("False")
Seems like cookies are disabled on this browser, please enable them to open this website
Incorrect Regex
You are viewing a single comment's thread. Return to all comments →
Below code throws an runtime error on Pypy 2 and wrong answer in Python 3 version. Works fine on Pypy 3.
import re S = [] T = int(input()) for i in range(T): S.append(input()) for s in S: try: re.compile(s) print("True") except: print("False")