You are viewing a single comment's thread. Return to all comments →
import re N = int(input()) valid_pattern = r'^[789]\d{9}' for _ in range(N): string = input() validity = re.match(valid_pattern, string) print('YES' if validity else 'NO') I try to be as straight as possible! to be comprehensible at most
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 →