def recall_password(cipher_grille, ciphered_password):
def XtoCHR(m1,m2):
newstr = ""
for c in range(len(m1)):
for d in range(len(m1[c])):
if m1[c][d].lower() == "x":
newstr += m2[c][d]
return newstr
def matrixR(m,s=True):
m2 = []
for i in range(len(m)):
a = ""
for j in range(len(m[i])):
a += m[j][i]
m2.append(a)
if not s:
return m2[::-1]
return [x[::-1] for x in m2]
cg = list(cipher_grille)
cp = list(ciphered_password)
newstring = XtoCHR(cg,cp)
for i in range(3):
t1 = matrixR(list(cg))
newstring += XtoCHR(cg,cp)
return newstring
I can't pin point problem. I know I did a lot unecessery code since I thought I am working with lists not tuples.
AssertionError: First example
<module>, 31
Created at: 2019/11/15 17:30; Updated at: 2019/11/15 18:06
The question is resolved.