I am currently trying to figure out what these two lines of code are doing for bitmasking, can someone please help me explain what they are?
bit_number = lambda ch : ord(ch) - ord('a')
bitmask1 |= 1 << bit_number(ch)
I am currently trying to figure out what these two lines of code are doing for bitmasking, can someone please help me explain what they are?
bit_number = lambda ch : ord(ch) - ord('a')
bitmask1 |= 1 << bit_number(ch)