You are viewing a single comment's thread. Return to all comments →
import re N=int(input()) for i in range(N): num=input() if len(num)<10: print('NO') else: pattern=r"^[789][0-9]{9}$" if bool(re.match(pattern,num))==True: 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 →