Open jmpark0118 opened 3 years ago
import re
if __name__ == '__main__':
for _ in range(int(input())):
find = re.search('^[789]{1}[\d]{9}$', input())
if find is None:
print("NO")
else:
print("YES")
출처 : https://www.hackerrank.com/challenges/validating-the-phone-number/problem