欢迎光临散文网 会员登陆 & 注册

python报错TypeError: bad operand type for unary +: 'str'的一种解决方法

2023-06-19 20:17 作者:LogByMax  | 我要投稿

(认知有限, 如有不妥,还望告知,欢迎讨论)


问题产生背景

在执行对字符串的连接操作时报错TypeError: bad operand type for unary +: 'str'


解决方案:增加换行符(对的,这里就是这么简单。。。)


没了,其他的可能,或许可以在下面这里找到

https://stackoverflow.com/questions/54839901/python-typeerror-bad-operand-type-for-unary-str


=END=

python报错TypeError: bad operand type for unary +: 'str'的一种解决方法的评论 (共 条)

分享到微博请遵守国家法律