错误提示:Python TypeError: can only concatenate str (not "Tag") to str
这个错误的意思是类型错误:字符串只能拼接字符串
。
错误写法:
print("a+b=" + c)
正确写法:
print("a+b=" + str(c))
错误提示:Python TypeError: can only concatenate str (not "Tag") to str
这个错误的意思是类型错误:字符串只能拼接字符串
。
错误写法:
print("a+b=" + c)
正确写法:
print("a+b=" + str(c))