def UpdateFlag(flag) : if (flag & 16) == 16 : return 16 else : return 0 # Returns the cigar length when cigar is expressed base by base, # up to the index k of cigarlist (default is a very large index)