'''
给你一串字符串,判断着是否是手机号
'''
def checkPhone(str):
if len(str) != 11:
return False
elif str[0] != "1":
return False
elif str[1:3] != "39" and str[1:3] != "31":
print(str[1:3])
return False
print("***")
for i in range(3,11):
print(str[i])
if str[i] < "0" or str[i] > "9":
return False
return True
print(checkPhone("13912345678"))
print(checkPhone("139123456785"))
print(checkPhone("1391234a678"))
print(checkPhone("23912345678"))
print(checkPhone("19012345678"))