Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First --numpy is an efficient module solution in 3rd party category for Cipher Map by wyf.141060
import numpy as np
def recall_password(cipher_grille, ciphered_password):
cg = np.array([[*sub] for sub in cipher_grille], dtype=np.str_)
cp = np.array([[*sub] for sub in ciphered_password], dtype=np.str_)
coors = [(key[:, 0], key[:, 1]) for key in map(lambda x: np.argwhere(np.rot90(cg, x) == 'X'), range(0, -4, -1))]
return ''.join([''.join(cp[coor[0], coor[1]].tolist()) for coor in coors])
Dec. 8, 2018