Python '<';在';int';和';str';don';我甚至不知道要输出什么 ”
注意这行Python '<';在';int';和';str';don';我甚至不知道要输出什么 ”,python,python-3.x,Python,Python 3.x,注意这行 TypeError: '<' not supported between instances of 'int' and 'str' 注意那条线 TypeError: '<' not supported between instances of 'int' and 'str' python中的input函数返回字符串对象。将int对象与str对象进行比较将引发TypeError(问题在于而(count
TypeError: '<' not supported between instances of 'int' and 'str'
注意那条线
TypeError: '<' not supported between instances of 'int' and 'str'
python中的
input
函数返回字符串对象。将int
对象与str
对象进行比较将引发TypeError(问题在于而(count
)将输入转换为int。int(输入('set range:-'))
python中的函数返回字符串对象。将int
对象与str
对象进行比较将引发TypeError(问题在而(计数
)将输入转换为int。int(输入('set range:-'))
TypeError: '<' not supported between instances of 'int' and 'str'
count < n
n = int(input("set range:- "))