You are viewing a single comment's thread. Return to all comments →
import re N= int(input()) patron =r'^[7|8|9]\d{9}' for i in range (N): s = input() if (re.fullmatch(patron, s )): 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 →