def get_subset_from_bitstring(super_set, bitstring):
 if (len(super_set) != len(bitstring)):
  raise ValueError('The sizes of the lists are not equal')
 return [super_set[i] for (i, j) in enumerate(bitstring) if (bitstring[i] == '1')]

def get_subset_from_bitstring ( super_set , bitstring ) : if ( len ( super_set ) != len ( bitstring ) ) : raise ValueError ( 'The sizes of the lists are not equal' ) return [ super_set [ i ] for ( i , j ) in enumerate ( bitstring ) if ( bitstring [ i ] == '1' ) ]
gets the subset defined by the bitstring .