首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

TypeError: argument of typeint‘ is not iterable「建议收藏」

int 转成str就可以了 ———————————————————————————————————— TypeError: argument of typeint’ is not iterable...site-packages\selenium\webdriver\support\select.py”, line 78, in select_by_value css = “option[value =%s]...selenium\webdriver\support\select.py”, line 219, in _escapeString if ‘”‘ in value and “‘” in value: TypeError...: argument of typeint’ is not iterable 后来解决了,类型的问题。...把int 转成str就可以了 版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

52820
您找到你想要的搜索结果了吗?
是的
没有找到

【hacker的错误集】TypeError: can‘t multiply sequence by non-int of type ‘str‘

报错分析 ✅解决方案 ✅报错内容 num_a = input('请输入num_a的值:') num_b = input('请输入num_b的值:') res = num_a * num_b ✅报错分析 TypeError...: can’t multiply sequence by non-int of type ‘str’ 我比较喜欢通过单词的意思来分析报错 TypeError类型错误 multiply乘 sequence...通过分析可以得出报错意思大概是类型错误:无法将序列与字符串类型的非整数相乘 python中,input()函数默认返回字符串类型,无论输入是什么返回都是字符串类型,字符串不能相乘 ✅解决方案 强转类型即可 num_a = int...(input('请输入num_a的值:')) num_b = int(input('请输入num_b的值:')) res = num_a * num_b print(res) 或者 num_a = input...('请输入num_a的值') num_b = input('请输入num_b的值') res = int(num_a) * int(num_b) print(res) 解决!!!

48540

Python错误、异常和模块

Traceback (most recent call last)  in  ----> 1 1+'1' TypeError...: unsupported operand type(s) for +: 'int' and 'str' 整形与字符串之间不存在加法运算,解释器分析出后会给出一个TypeError,这是一个类型错误,并且在后面给出错误的解释...In [11]: a = 1;b = '2' In [12]: try:     ...:     print(a+b)     ...: except TypeError:     ...:     ...这样就囊括了所有异常可能发生的状况: In [15]: try:     ...:     print(a+b)     ...: except Exception as e:     ...:     print(e) unsupported... operand type(s) for +: 'int' and 'str' 抛出异常 利用raise语句可以主动抛出一个异常,但抛出的异常必须是要继承于Exception的异常类或者异常示例。

1.2K40
领券