Getting math scores (Dictionary inside dictionary)
Mark Lawrence
breamoreboy at yahoo.co.uk
Tue Nov 24 08:30:23 EST 2015
On 24/11/2015 12:23, Arie van Wingerden wrote:
> Hi Mark, what use would that have? Please show your code ...
>
> 2015-11-24 13:15 GMT+01:00 Mark Lawrence <breamoreboy at yahoo.co.uk>:
>
>> 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
>>
1) I was being facetious.
2) How many times do people have to be asked not to top post here before
they stop top posting?
3) I only have two things to say so this is superfluous.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Python-list
mailing list