问题代码:
if ch>=b'0'
(Pdb) type(ch)
<class 'bytes'>
(Pdb) type(b'0')
<class 'bytes'>
TypeError: '>=' not supported between instances of 'bytes' and 'str'
请问该如何解决?
需要完整代码吗
问题代码:
if ch>=b'0'
(Pdb) type(ch)
<class 'bytes'>
(Pdb) type(b'0')
<class 'bytes'>
TypeError: '>=' not supported between instances of 'bytes' and 'str'
请问该如何解决?
需要完整代码吗
4 回答4.4k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
1 回答3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
1 回答4.5k 阅读✓ 已解决
1 回答3.8k 阅读✓ 已解决
1 回答2.8k 阅读✓ 已解决
都转化为int类型进行比较