Getting math scores (Dictionary inside dictionary)
Mark Lawrence
breamoreboy at yahoo.co.uk
Tue Nov 24 07:15:48 EST 2015
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
More information about the Python-list
mailing list