You are viewing a single comment's thread. Return to all comments →
import re
uid = list T = int(input()) pattern = r'^(?=(?:.[A-Z]){2,})(?=(?:.\d){3,})[A-Za-z\d]+$'
for _ in range(T): # print(T) id = input() if len(set(id))==10: if re.match(pattern, id): print("Valid") else: print("Invalid") else: print("Invalid")
Seems like cookies are disabled on this browser, please enable them to open this website
Validating UID
You are viewing a single comment's thread. Return to all comments →
import re
uid = list T = int(input()) pattern = r'^(?=(?:.[A-Z]){2,})(?=(?:.\d){3,})[A-Za-z\d]+$'
for _ in range(T): # print(T) id = input() if len(set(id))==10: if re.match(pattern, id): print("Valid") else: print("Invalid") else: print("Invalid")