+ 5
OK - it's clear now for me. I have done some reworking and added also comments. https://code.sololearn.com/coBim3BnqVUp/?ref=app
3rd Jan 2020, 7:02 AM
Lothar
Lothar - avatar
+ 6
Can you please give a description what the program should do with the digits in list maze? How should "maze" looks like after the program is executed? This would help us a lot. Thanks!
2nd Jan 2020, 8:57 PM
Lothar
Lothar - avatar
+ 4
put this code at the very end of your file: print() count = 0 col = 5 for i in maze: print(f'{i:2}', end = '') count += 1 if count == col: print() count = 0
3rd Jan 2020, 12:01 PM
Lothar
Lothar - avatar
+ 3
You have set 'n' to the value 0. Then you have initiated a for loop, which loops 26 times, each removing 'n' (0) from 'maze'. After 6 or 7 iterations, there are no more 0s left, so the line maze.remove(n) raises an error.
2nd Jan 2020, 6:37 PM
Russ
Russ - avatar