mercredi 17 février 2016

Hex bytes in if statements

I'm struggling to figure out how to use hexbytes for if statements:

i.e

if hexByte > 0x7F:
    do something

Can anyone advise what the correct syntax is for hexByte conditionals in python?

EDIT:

Added example code:

sentence = 'Thïs s a sèntencè with extended ascii chars Ç'

    for letter in sentence:
        letter = hex(ord(letter))
        if letter > 0x7F:
            print letter

Aucun commentaire:

Enregistrer un commentaire