Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Zip for Rotation solution in Clear category for Cipher Map by jtokaz
def recall_password(g, p):
password = []
for _ in range(4):
password.extend([y for x, y in zip(''.join(g), ''.join(p)) if x == 'X'])
g = [''.join(x[::-1]) for x in zip(*g)]
return ''.join(password)
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert recall_password(
('X...',
'..X.',
'X..X',
'....'),
('itdf',
'gdce',
'aton',
'qrdi')) == 'icantforgetiddqd', 'First example'
assert recall_password(
('....',
'X..X',
'.X..',
'...X'),
('xhwc',
'rsqx',
'xqzz',
'fyzr')) == 'rxqrwsfzxqxzhczy', 'Second example'
June 16, 2019