You are viewing a single comment's thread. Return to all comments →
import re t = int(input()) pattern = r'^(?=.*[A-Z]{2})(?=.*[0-9]{3})(?!.*(.)\1)[a-zA-Z0-9]{10}$' for _ in range(t): string = ''.join(sorted(input())) result = re.match(pattern, string) print('Valid' if result else '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 →