Returning a result from 3 items in a list

Denis McMahon denismfmcmahon at gmail.com
Tue Nov 24 09:07:31 EST 2015


On Tue, 24 Nov 2015 02:04:56 -0800, Cai Gengyang wrote:

> Here's a dictionary with 3 values :
> 
> results = {
>   "gengyang": 14,
>   "ensheng": 13, "jordan": 12
> }
> 
> How do I define a function that takes the last of the 3 items in that
> list and returns Jordan's results i.e. (12) ?

You open a web browser and google for "python dictionary"

-- 
Denis McMahon, denismfmcmahon at gmail.com



More information about the Python-list mailing list