You are viewing a single comment's thread. Return to all comments →
import re pattern = r"^[7-9]\d{9}$" for _ in range(int(input())): print("YES" if bool(re.search(pattern, input())) else "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 →