Jul-30-2017, 04:19 PM
data = [1, 2, 3, 4, 5] while data: print(data.pop(2, None))I think with your improvement the loop will be infinite.
Suppress a IndexError is never a good idea in my opinion.
But this have to be discussed :-)
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!