import itertools s=set() for a,b,c,d,e,f in itertools.product(["sum","range","ord","min","str"],repeat=6): try: w="chr(%s(%s(%s(%s(%s(%s(not())))))))"%(a,b,c,d,e,f);v=eval(w) if v>" "and v not in s:s.add(v);print(w) except:0
Note that non-ascii characters in the above source code will be escaped (such as \x9f).