Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #99318
| Path | csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Cai Gengyang <gengyangcai@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Getting math scores (Dictionary inside dictionary) |
| Date | Tue, 24 Nov 2015 19:22:41 +0800 |
| Lines | 32 |
| Message-ID | <mailman.104.1448366002.2291.python-list@python.org> (permalink) |
| References | <efdba2f0-8d09-4c83-b11c-62857e8ff20b@googlegroups.com> <CADkALSF0ywARkJHAOZ76ys7xXQuYmAw7ntzFYRuPhVJ3kHr0zQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de KQDHjRLiy1yYcAIRuIxBpA8Sgo8Q0h4YS8hheJrZutQg== |
| Return-Path | <gengyangcai@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.031 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'subject:Getting': 0.09; '>>>': 0.15; '12:04': 0.16; '24,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'email addr:gmail.com>': 0.18; '>>>': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.24; 'van': 0.26; 'message-id:@mail.gmail.com': 0.27; 'url:mailman': 0.30; 'url:python': 0.33; 'url:listinfo': 0.34; 'tue,': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'nov': 0.35; 'received:74.125.82': 0.35; 'skip:p 30': 0.35; 'url:org': 0.36; 'skip:{ 10': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; 'thanks': 0.37; '12,': 0.37; 'thank': 0.38; 'url:mail': 0.40; 'results': 0.66; 'maths': 0.84; 'scores': 0.91; 'works!': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gSKP/X3lHFQ2LgWE7f91juqu8kuFxdv3t03Cm7/SVAg=; b=OTFYdqO3lHKOGKPDXaIq+vaWAbzy2UBhryMfPfSwl7whWKOXoKya1rVaa2vmBkB3OY 2/MA4C/55xikbGZ7BCB8DVaFkB9MHvo/7ONoMZ+DoQTppJHpAEfSaITBuTzDNV4ZX3JK xaRQ4K+L5RJXv4A9Iabc/oM0XYhW4EaKlkILJ4LtavM9V47J6EajcHoneUaKXocCvjcR gtQgcQmz9Cz1pyMYopj/11i0ohEn3t8ee/RVJ406oramwsgPKnueD3w5Ce1wPGfxy2b/ HeB52OIvxk22U/zFsBpIAu84O+R1NceJk709BACqaRYwJzcyjBZkdo3KeeooDawrdC5T CsvQ== |
| X-Received | by 10.28.60.11 with SMTP id j11mr21492956wma.57.1448364161625; Tue, 24 Nov 2015 03:22:41 -0800 (PST) |
| In-Reply-To | <CADkALSF0ywARkJHAOZ76ys7xXQuYmAw7ntzFYRuPhVJ3kHr0zQ@mail.gmail.com> |
| X-Mailman-Approved-At | Tue, 24 Nov 2015 06:53:20 -0500 |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.20+ |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:99318 |
Show key headers only | View raw
Great, it works! Thanks a lot ..
>>> results = {
"gengyang": { "maths": 10, "english": 15},
"ensheng": {"maths": 12, "english": 10},
"jordan": {"maths": 9, "english": 13}
}
>>> print((results["gengyang"])["maths"])
10
On Tue, Nov 24, 2015 at 7:10 PM, Arie van Wingerden <xapwing@gmail.com>
wrote:
> print((results["gengyang"])["maths"])
>
> 2015-11-24 12:04 GMT+01:00 Cai Gengyang <gengyangcai@gmail.com>:
>
>> results = {
>> "gengyang": { "maths": 10, "english": 15},
>> "ensheng": {"maths": 12, "english": 10},
>> "jordan": {"maths": 9, "english": 13}
>> }
>>
>> How do you get gengyang's maths scores ?
>>
>> Thank you ...
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
>
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Getting math scores (Dictionary inside dictionary) Cai Gengyang <gengyangcai@gmail.com> - 2015-11-24 03:04 -0800
Re: Getting math scores (Dictionary inside dictionary) Steven D'Aprano <steve@pearwood.info> - 2015-11-24 22:28 +1100
Re: Getting math scores (Dictionary inside dictionary) Cai Gengyang <gengyangcai@gmail.com> - 2015-11-24 19:22 +0800
Re: Getting math scores (Dictionary inside dictionary) Arie van Wingerden <xapwing@gmail.com> - 2015-11-24 12:10 +0100
Re: Getting math scores (Dictionary inside dictionary) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-24 12:15 +0000
Re: Getting math scores (Dictionary inside dictionary) Arie van Wingerden <xapwing@gmail.com> - 2015-11-24 13:23 +0100
Re: Getting math scores (Dictionary inside dictionary) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-24 13:30 +0000
Re: Getting math scores (Dictionary inside dictionary) Marko Rauhamaa <marko@pacujo.net> - 2015-11-24 15:41 +0200
Re: Getting math scores (Dictionary inside dictionary) Arie van Wingerden <xapwing@gmail.com> - 2015-11-24 15:43 +0100
Re: Getting math scores (Dictionary inside dictionary) Denis McMahon <denismfmcmahon@gmail.com> - 2015-11-24 14:09 +0000
csiph-web