Enter the prviously generated codes again in arr [ ] in reverse order . Nor arr [ ] has double number of codes .
for j in range ( i - 1 , - 1 , - 1 ) : NEW_LINE INDENT arr . append ( arr [ j ] ) NEW_LINE DEDENT