其他分享
首页 > 其他分享> > citySearcher.py

citySearcher.py

作者:互联网

import logging

# returns corresponding tempAbbr, tempStdCountryName, tempGEO for given countryName
def citySearcher(cityName, citySearcherDic):
cityName = cityName.upper()
if cityName in citySearcherDic.keys():
tempAbbr, tempStdCountryName, tempGEO = citySearcherDic[cityName]

else:
tempAbbr = ""
tempStdCountryName = ""
tempGEO = ""
logging.info("No corresponding info (Abbr, stdCntryName, GEO) was found for city: " + cityName)
return tempAbbr, tempStdCountryName, tempGEO

标签:citySearcher,py,cityName,tempAbbr,tempStdCountryName,citySearcherDic,tempGEO
来源: https://www.cnblogs.com/zhulimin/p/15369443.html