问题补充说明:Python代码最后两行代码为什么中间不能用一个加号连起来,合并成一行?citis={"jinan":{"country":"china","population":5000000,"fact":"thecityisdirty!",},"newyork":{"country":"... Python代码最后两行代码为什么中间不能用一个加号连起来,合并成一行?citis={ "jinan":{ "country":"china", "population":5000000, "fact":"the city is dirty!", }, "newyork":{ "country":"usa", "population":20000000, "fact":"financial center", }, "sydney":{ "country":"anstrilia", "population":6000000, "fact":"a beautiful city!", },}for name,infor in citis.items(): print(name+" is in "+infor["country"]) print(name+"'population is") print(infor["population"]) 展开
字符串不能和整型用加号连接,除非细宜星扩吧蛋差屋将整型转为字符串型
标签:Python,代码