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 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: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de KQDHjRLiy1yYcAIRuIxBpA8Sgo8Q0h4YS8hheJrZutQg== Return-Path: 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99318 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 wrote: > print((results["gengyang"])["maths"]) > > 2015-11-24 12:04 GMT+01:00 Cai Gengyang : > >> 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 >> > >