IndexToBitMask(NF, IndexList) generates a BitMask represented by a string with NF characters and those at position in IndexList equal to '1'.
### p###
BitMask = IndexToBitMask(15,{0,1,2}) print(BitMask)
111000000000000