TypeError: unsupported operand type(s) for +: 'int' and 'str' [closed] sql="insert into auto_transfer_data(atd_type,atd_mogodb_count,atd_mysql_before_count,atd_create_date)values('"+at_type+"','"+str(mongodbcount)+"','"+str(m…
n = input() if n>=100:print(int(n)/10) else:print(int(n)*10) 报错内容: Traceback (most recent call last): File "1.py", line 12, in <module> if n>=100:print(int(n)/10) TypeError: '>=' not supported between instances of 'str' and 'int'…
Error Msg Traceback (most recent call last): File "E:/code/adva_code/my_orm.py", line 108, in <module> user.save() File "E:/code/adva_code/my_orm.py", line 91, in save sql = "insert {}({}) value({})".format(self._meta[&…
当我们编程时,有时会出现如下错误:TypeError: '>' not supported between instances of 'str' and 'int' 如下图: 这是因为input()返回的数据类型是str类型,不能直接和整数进行比较,必须先把str转换成整型,使用int()方法:age = int(input ("请输入你的年龄:")) 改正之后为: 这样程序就达到了预期的效果了…