BitMask = "00000 10101 000" NF, Index = BitMaskToIndex(BitMask) print(NF) print(Index)