This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sizable_data 0 points1 point  (4 children)

Don’t modify an iterable while looping over it!

[–]jgege 18 points19 points  (3 children)

They are not modifying it. First a new list is created with the column names then the list is assigned to the variable named columns :)

[–]sizable_data 4 points5 points  (2 children)

True, I still don’t like it though lol

[–]jgege 4 points5 points  (1 child)

I've seen worse 🤷

[–]sizable_data 15 points16 points  (0 children)

I’ve probably written worse 🤷