You are viewing a single comment's thread. Return to all comments →
why not aceppt this? 1. import re 2. for _ in range(int(input())): 3. isha = input() 4. jinx = set(isha) 5. powder = list(isha) 6. p = r'[a-zA-Z-0-9]{1,}.\d{1,}' 7. match = re.match(p,isha) 8. if len(isha) == 10: 9. if match: 10. if len(powder) > len(jinx): 11. print('Invalid') 12. elif bool(re.match(p,isha)): 13. print('Valid')
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Validating UID
You are viewing a single comment's thread. Return to all comments →
why not aceppt this? 1. import re 2. for _ in range(int(input())): 3. isha = input() 4. jinx = set(isha) 5. powder = list(isha) 6. p = r'[a-zA-Z-0-9]{1,}.\d{1,}' 7. match = re.match(p,isha) 8. if len(isha) == 10: 9. if match: 10. if len(powder) > len(jinx): 11. print('Invalid') 12. elif bool(re.match(p,isha)): 13. print('Valid')