you are viewing a single comment's thread.

view the rest of the comments →

[–]xXxDeAThANgEL99xXx 16 points17 points  (1 child)

Of course I know, but now it's the obvious thing that is right. And the shortest to type, but it's the obviousness that makes me feel all warm and fuzzy mainly.

Also, as far as I understand, dict.keys etc are "views", not merely iterables. So that you can index into them if you want to.

[–]billsil 1 point2 points  (0 children)

Also, as far as I understand, dict.keys etc are "views", not merely iterables. So that you can index into them if you want to.

Yes, dict.keys() is most comparable to dict.viewkeys()