w3schools
编辑器
运行结果尺寸:
625 x 591
age = 36 txt = "My name is John, I am " + age print(txt)
x
age = 36
txt = "My name is John, I am " + age
print(txt)
Traceback (most recent call last):
File "demo_string_format_error.py", line 2, in <module>
txt = "My name is John, I am " + age
TypeError: must be str, not int