python3报错:TypeError: ‘>’ not supported between instances of ‘str’ and ‘int’
**报错原因:**int类型没有转换为str就比较。
**解决办法:**将int类型转换为str。
运行结果报错如下:
运行结果正确如下:
python3报错:TypeError: ‘>’ not supported between instances of ‘str’ and ‘int’
**报错原因:**int类型没有转换为str就比较。
**解决办法:**将int类型转换为str。
运行结果报错如下:
运行结果正确如下:
相关文章: