There are a few functions and interfaces that are useful for working with data, from simple ones such as sum, max, and min, to complex ones such as zip, map, filter, and reduce.
Useful functions to use with data structures
The sum, max, and min functions
These functions are pretty much self-explanatory: they will try to summarize or compare values in iterables. Just remember that for the dictionary, its keys—not values—will be used:
sum({1:'A', 2:'B'})
>>> 3
Note that min and max don't require elements to be integers or floats:
max({'A':1, 'B':2})
>>> 'B'