def find_triple_interlock(): cnts = 0 for x in l: if mystr.find_bisect(l,x[::3])<>-1 and mystr.find_bisect(l,x[1::3])<>-1 and mystr.find_bisect(l,x[2::3])<>-1: cnts += 1 print x,x[::3],x[1::3],x[2::3] print cnts
def get_reverse_bisect(l): cnts = 0 for x in l: y = x[::-1] if mystr.find_bisect(l, y) <> -1: cnts += 1 print x, y print cnts
print " " print "==" z.start() for x in l: if x == ss: print ss, " in wocabulary" break print z print " " print "find bisect" z.start() print mystr.find_bisect(l, ss) print z print " " print "in dict" z.start() if ss in d: print ss, " in wocabulary" else: print "not in wocabulary" print z print " "