热线电话:13121318867

登录
2021-03-24 阅读量: 1197
python报错TypeError: unsupported operand type(s) for +: 'int' and 'str'

问:

python报错TypeError: unsupported operand type(s) for +: 'int' and 'str'

image.png


答:

这是因为变量j的取值为字符型“a”,字符型变量不支持加法运算,因此出现类型错误。

59.9593
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子