Santosh Kumar <rhce....@gmail.com> Wrote in message: > want to understand about where to use , viewkeys() viewvalues() viewitems()
.............. Sometimes you want to loop through a dict, doing something with each of the items. For example you want to generate a report. Suppose you have a dict where the keys are names and the values are grades. Perhaps you want to calculate the average grade. You don't care about names, so you loop through values. Or you want to check how many names begin with J. Loop through the keys. -- DaveA _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor