You are viewing a single comment's thread. Return to all comments →
def checks(x): n = c = 0 y = list(x)
for i in y: if i.isdigit(): n += 1 if i.isupper(): c += 1 if y.count(i) > 1: return False if n >= 3 and c >= 2: return True else: return False
for _ in range(int(input())): s = input() if len(s) == 10 and s.isalnum() and checks(s): print("Valid") 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 →
def checks(x): n = c = 0 y = list(x)
for _ in range(int(input())): s = input() if len(s) == 10 and s.isalnum() and checks(s): print("Valid") else: print("Invalid")