You are viewing a single comment's thread. Return to all comments →
import re N = int(input()) phone_number_list = [ input() for i in range(N) ] for phone_number in phone_number_list: if len(phone_number) == 10 and phone_number.isdigit() and re.match(r"^[789](\d)", phone_number): print("YES") else: print("NO")
Seems like cookies are disabled on this browser, please enable them to open this website
Validating phone numbers
You are viewing a single comment's thread. Return to all comments →