Python 函数:格式化城市和国家名称
def get_formatted_city(city, country): '生成简洁的城市和国家名称' formatted_city = city.title() + ', ' + country.title() return formatted_city
示例调用
print(get_formatted_city('santiago', 'chile'))
原文地址: https://www.cveoy.top/t/topic/oUo0 著作权归作者所有。请勿转载和采集!