487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 102808 Accepted: 17241 Descr iption Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase.
487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 102808 Accepted: 17241 Descr iption Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase.
判断电话号码
注:可以给我充话费~
import re
# r 原生字符串 避免掉干扰
def checkPhone(number):
# 18434766698
# pat = r'1[35789]\d{9}$'
# pat = r'1([35789]\d)|(47)\d{8}$'
pat = r'1(([35789]\d)|(47))\d{8}$'
res = re.match(pat,number)
print(res)
checkPhon