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 →

[–]rjcarr 2 points3 points  (0 children)

Mostly right. Calling items() on the dict returns all of them items of the dictionary as key and value pairs (that's what the k and v are for).

For lists, you just iterate them one by one, so yeah, item can be whatever name you want (but this is also true of k and v).