Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #99305
| X-Received | by 10.31.47.202 with SMTP id v193mr16171844vkv.6.1448359496837; Tue, 24 Nov 2015 02:04:56 -0800 (PST) |
|---|---|
| X-Received | by 10.50.112.201 with SMTP id is9mr414559igb.10.1448359496760; Tue, 24 Nov 2015 02:04:56 -0800 (PST) |
| Path | csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!b51no1906243qgf.0!news-out.google.com!f6ni11921igq.0!nntp.google.com!mv3no1235431igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Tue, 24 Nov 2015 02:04:56 -0800 (PST) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=116.89.57.142; posting-account=V6fVrwoAAAB_KNNhh7gdmvqhYlmrIkSO |
| NNTP-Posting-Host | 116.89.57.142 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <133829df-f57f-442f-9dbf-b22b22f656ae@googlegroups.com> (permalink) |
| Subject | Returning a result from 3 items in a list |
| From | Cai Gengyang <gengyangcai@gmail.com> |
| Injection-Date | Tue, 24 Nov 2015 10:04:56 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Received-Bytes | 1245 |
| X-Received-Body-CRC | 3325932545 |
| Xref | csiph.com comp.lang.python:99305 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Returning a result from 3 items in a list Cai Gengyang <gengyangcai@gmail.com> - 2015-11-24 02:04 -0800
Re: Returning a result from 3 items in a list Chris Angelico <rosuav@gmail.com> - 2015-11-24 21:14 +1100
Re: Returning a result from 3 items in a list Cai Gengyang <gengyangcai@gmail.com> - 2015-11-24 02:27 -0800
Re: Returning a result from 3 items in a list Peter Otten <__peter__@web.de> - 2015-11-24 11:35 +0100
Re: Returning a result from 3 items in a list Cai Gengyang <gengyangcai@gmail.com> - 2015-11-24 02:47 -0800
Re: Returning a result from 3 items in a list Chris Angelico <rosuav@gmail.com> - 2015-11-24 22:05 +1100
Re: Returning a result from 3 items in a list Cai Gengyang <gengyangcai@gmail.com> - 2015-11-24 03:06 -0800
Re: Returning a result from 3 items in a list Peter Otten <__peter__@web.de> - 2015-11-24 11:32 +0100
Re: Returning a result from 3 items in a list Denis McMahon <denismfmcmahon@gmail.com> - 2015-11-24 14:07 +0000
Re: Returning a result from 3 items in a list Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-24 14:28 +0000
Re: Returning a result from 3 items in a list Ned Batchelder <ned@nedbatchelder.com> - 2015-11-24 08:59 -0800
Re: Returning a result from 3 items in a list Cai Gengyang <gengyangcai@gmail.com> - 2015-11-25 02:26 -0800
Re: Returning a result from 3 items in a list Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-25 11:22 +0000
csiph-web