-1

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)
mkrieger1
  • 14,486
  • 4
  • 43
  • 54
mippi
  • 1
  • 2
    The first line has nothing to do with bitmasking. – mkrieger1 May 29 '22 at 22:32
  • 1
    Welcome to Stack Overflow. Please read [ask] and note well that this is **not a discussion forum**. It is [not possible to "explain code"](https://meta.stackoverflow.com/questions/253894) in a vacuum because there is not a real question there: we have no way to know *what* you don't understand about the code, nor *how* to explain it. There are several things being done in this code, and depending on which things you do or don't understand, each could be a separate question. [Please also try to find existing answers](https://meta.stackoverflow.com/questions/261592) for those questions. – Karl Knechtel May 29 '22 at 22:38

0 Answers0