I came across these three types when I used collections.Counter
's viewkeys(), viewitems() and viewvalues() methods.
The values those three methods returned are of types dict_keys
, dict_items
and dict_values
.
They are iterable, as I have noticed.
But my question is, why do these three types exist? Or what's their usage?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…