【发布时间】:2015-10-18 14:57:27
【问题描述】:
age = raw_input ('How old are you? ')
print "In two year's time you will be: " , age + 2
如何让这段代码的最后一行起作用?我在 Python 中运行时收到错误 TypeError: cannot concatenate 'str' and 'int' objects。
【问题讨论】:
-
age = int(raw_input('How old are you? '))?
标签: python string concatenation