from phone import Phone
def getlocation(num):
if ';' in num:
nums=num.split(';')
for i in nums:
if len(str(i))==11:
try:
info=Phone().find(i)
city = info['city']
return city
except Exception as e:
# print(e)
return ""
else:
if len(str(num))==11:
try:
info=Phone().find(num)
city = info['city']
return city
except Exception as e:
# print(e)
return ""