Hey guys, I got a problem I was hoping someone could help me figure out!
I have a string with a hexadecimal number = '0x00000000'
which means:
0x01000000 = apple
0x00010000 = orange
0x00000100 = banana
All combinations with those are possible. i.e., 0x01010000 = apple & orange
How can I from my string determine what fruit it is? I made a dictionary with all the combinations and then comparing to that, and it works! But I am wondering about a nicer way of doing it.