python初学者求教 python两个版本(加法运算)

教你一个捕鱼的方法,你自己就会明白怎么回事。print type(a)print type(b)在python shell 中不要print直接type(a) type(b) 【python初学者求教 python两个版本(加法运算)】 python初学者求教 python两个版本(加法运算)


■网友
python3中 input() 会把输入都当做字符串,需要手动转成合适类型a = int(input(\u0026#39;a:\u0026#39;))python2中会把 input() 的内容执行,一般输入尽量用raw_input()


    推荐阅读