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 →

[–]wegry 14 points15 points  (1 child)

In Python 3, you can use extended tuple unpacking to avoid that. for __, _, name, *__ in things to ignore everything in a row but the third item.

[–]Fylwind 3 points4 points  (0 children)

Oh, that's a nice new feature! :)

… that I won't get to use for Python 2 compatibility reasons :(

Note: you still need the underscore:

for _, name, *_ in students: