I was wondering if someone could tell me the pythonic way to check out the following.
I have a 6 bit binary number and want to check with its decimal values. Using mathematical function is one way but still it would require that I write around 2**6 if constructs.
So I wanted to know if there's an easier statement to write it.
Also assume that lets say it's not binary then what's the better way to check for 2**6 values in python.
if(a==1):
....
else:
if(a==2)
.....
One way is saving it in a list and checking it with the indexes but still that would require that many if-else I guess.....
Thanks ....