Encryption in 325 Characters or Less with Bennett!
2024-01-23What encryption scheme is this?
def e(s,d,r=""):
p=lambda j,d:53>(k:=d.index(j))and d[:k]+[d[k+1],j]+d[k+2:]
or[d[0],j]+d[1:k];d=p(54,p(54,p(53,d)));l,h=sorted([d.index(53)
,d.index(54)]) d=d[h+1:]+d[l:h+1]+d[:l];b=min(d[-1],53);d=d[b:-1]
+d[:b]+[d[-1]];o=d[min(d[0],53)];return s and(53>o and e(s[1:],d,
r+chr(97+(ord(s[0])-97+o)%26))or e(s,d,r))or r
encrypt=e
See Bennett's post here!