当前位置:知识百答>百科知识>Python代码

Python代码

2023-03-18 17:34:48 编辑:join 浏览量:650

问题补充说明: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代码

字符串不能和整型用加号连接,除非细宜星扩吧蛋差屋将整型转为字符串型

标签:Python,代码

版权声明:文章由 知识百答 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.zhshbaida.com/article/20611.html
热门文章