Returning a result from 3 items in a list

Cai Gengyang gengyangcai at gmail.com
Tue Nov 24 05:04:56 EST 2015


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) ?

Thanks a lot !

Gengyang



More information about the Python-list mailing list