Python 3 bytes comparison

question Code:

if ch>=b"0"

(Pdb) type (ch)
< class" bytes" >
(Pdb) type (baked 0")
< class" bytes" >

TypeError:"> = "not supported between instances of" bytes" and "str"
how to solve this problem?

do you need the complete code

Apr.07,2022

are all converted to int types for comparison

num = int(b'0')
ch = int(ch)
if ch >= num:
    pass
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b401f3-2c4cc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b401f3-2c4cc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?