l=[str(i)for i in range(1,10000)if len(set(str(i)))<3] s=sorted for i in l:all(print(j)for j in l if j==j[::-1]!=s(i)==s(j))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page