如何连接str和int对象?
things = 5print("You have " + things + " things.")
Traceback (most recent call last): File "<stdin>", line 1, in <module>TypeError: must be str, not int
Traceback (most recent call last): File "<stdin>", line 1, in <module>TypeError: cannot concatenate 'str' and 'int' objects
相关分类