python3报错:TypeError: ‘>’ not supported between instances of ‘str’ and ‘int’

**报错原因:**int类型没有转换为str就比较。

**解决办法:**将int类型转换为str。

运行结果报错如下:
TypeError: not supported between instances of str and int【python3】
运行结果正确如下:
TypeError: not supported between instances of str and int【python3】

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-14
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-04-20
  • 2021-10-07
相关资源
相似解决方案