Just some simple bit operations, see here 3
[d for d in range(10)] -> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[1 >> d for d in range(10)] -> [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[1 >> d & 1 for d in range(10)] -> [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[1 >> d & 1 for d in range(10)][::-1] -> [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]