You are viewing a single comment's thread. Return to all comments →
In Python 3:
N = int(input()) alien_name = r'^(_|\.)[0-9]{1,}[a-zA-Z]{0,}(_)?$' for _ in range(N): name = input() matched = re.match(alien_name, name) if bool(matched): print("VALID") else: print("INVALID")
Seems like cookies are disabled on this browser, please enable them to open this website
Alien Username
You are viewing a single comment's thread. Return to all comments →
In Python 3: