jeudi 10 novembre 2016

Tricky Simple Python

Can any one please explain me why the if condition is working.

x = 0xA5

if x == 0xAA or 0x5A or 0xA0 or 0xAB:
    print "Host Address is Correct"



0xAA or 0x5A or 0xA0 or 0xAB binary operation is not equal to 0xA5 either

Aucun commentaire:

Enregistrer un commentaire