I tend to break something like that OR line into multiple lines with \ so that I can look down the columns and make sure I didn't typo a number, but I'm sure it works fine as a 1-liner.
@mavica_again Someone who's really into python language features might write something like this: ``` from functools import reduce byte = reduce(lambda a,b: a|b, [bitmap[x,y+i] >> i for i in range(8)]) ``` I don't find that kind of thing easier to read or understand though, and it would probably give worse performance (not that it matters). I'd rather just write something that doesn't make me have to think harder.
@mavica_again Someone who's really into python language features might write something like this:
```
from functools import reduce
byte = reduce(lambda a,b: a|b, [bitmap[x,y+i] >> i for i in range(8)])
```
I don't find that kind of thing easier to read or understand though, and it would probably give worse performance (not that it matters). I'd rather just write something that doesn't make me have to think harder.