Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Arie van Wingerden Newsgroups: comp.lang.python Subject: Re: Getting math scores (Dictionary inside dictionary) Date: Tue, 24 Nov 2015 13:23:56 +0100 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de L4pJvlY3A3w/RyjPpdT1oQviSMe4t86aAbgCfxipSmlA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.141 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.72; '*S*': 0.00; 'received:209.85.160.174': 0.07; 'cc:addr:python-list': 0.09; 'subject:Getting': 0.09; 'mark,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'language': 0.19; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'lawrence': 0.22; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.27; 'url:mailman': 0.30; 'code': 0.30; 'language.': 0.32; 'url:python': 0.33; 'extract': 0.33; 'url:listinfo': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'received:209.85': 0.36; 'skip:{ 10': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; '12,': 0.37; 'received:209': 0.38; 'delete': 0.38; 'thank': 0.38; 'url:mail': 0.40; 'mark': 0.40; 'your': 0.60; 'show': 0.62; 'leaving': 0.63; 'our': 0.64; 'results': 0.66; 'have?': 0.84; 'jordan,': 0.84; 'maths': 0.84; 'pythonistas,': 0.84; 'score.': 0.84; 'to:addr:yahoo.co.uk': 0.84; 'scores': 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=1txKMRmhwSnRMu4KXOFmMdol10gh7VdOIAxuai6sabY=; b=04o4WSGypBRnJM3PvBT1VMFjnEbBHJICzijqmd4M01zUZsbwiJtCfNNCdgX1YP2Anf o+9CS31EF6YsAy0SEux3IUB/84iud7w7XaZT4TodeFetNtJJr//ebARtIc26bglMZi5g HIJi+OmVLFST/MaX//xFJznQf2O/cB/NlCSsnCFWYbt4aoDdcuQBpvy9dThFPhBlPG0m Y6Ie8BU5DDQQ/0bOpAlKGAqiTgVnnFNCfdCu4tKRIOipAGL61qS3JroXBoLnMc6FubDX nK5ZpgFDOPC5IPKwz5DGN/Q2wuyB/utM7pa9mOwRgIXQrxPmohBkor0+aHmzF9qjp8io G3UA== X-Received: by 10.13.242.67 with SMTP id b64mr27513798ywf.287.1448367836303; Tue, 24 Nov 2015 04:23:56 -0800 (PST) In-Reply-To: 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:99322 Hi Mark, what use would that have? Please show your code ... 2015-11-24 13:15 GMT+01:00 Mark Lawrence : > On 24/11/2015 11:04, Cai Gengyang wrote: > >> 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 ... >> >> > One way is to delete the scores for ensheng and jordan, only leaving those > for gengyang, then extract the maths score. > > -- > My fellow Pythonistas, ask not what our language can do for you, ask > what you can do for our language. > > Mark Lawrence > > -- > https://mail.python.org/mailman/listinfo/python-list >