如何连接str和int对象?
如果我尝试执行以下操作: things = 5 print("You have " + things + " things.") 我在Python 3.x中收到以下错误: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: must be str, not int ...以及Python 2.x中的类似错误: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: cannot concatenate 'str' and 'int' …