In-place modification of Python lists
I found this in the docs: https://docs.python.org/3/tutorial/controlflow.html#for Python’s for statement iterates over the items of any sequence (a list or a string), in the order that they appear in the sequence. If you need to modify the sequence you are iterating over while inside the loop (for example to duplicate selected items), it is recommended … Read more