Created
August 7, 2020 20:49
-
-
Save mayankdawar/517bd73bbe9d83d40f5dacedf828676c to your computer and use it in GitHub Desktop.
The variable nested_d contains a nested dictionary with the gold medal counts for the top four countries in the past three Olympics. Assign the value of Great Britain’s gold medal count from the London Olympics to the variable london_gold. Use indexing. Do not hardcode.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nested_d = {'Beijing':{'China':51, 'USA':36, 'Russia':22, 'Great Britain':19}, 'London':{'USA':46, 'China':38, 'Great Britain':29, 'Russia':22}, 'Rio':{'USA':35, 'Great Britain':22, 'China':20, 'Germany':13}} | |
london_gold = nested_d['London']['Great Britain'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment