W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
demo_python_string_format_error.py:
age = 36 txt = "My name is Bill, I am " + age print(txt)
C:\Users\My Name>python demo_python_string_format_error.py
Traceback (most recent call last):
File "demo_python_string_format_error.py", line 2, in <module>
txt = "My name is Bill, I am " + age
TypeError: must be str, not int