Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 2 : Making a Dictionary In this part of the assignment the goal is now to take the list of lists or the data
Problem : Making a Dictionary In this part of the assignment the goal is now to take the list of lists or the datalist variable contents and begin to construct a
dictionary. For example, first row of the datalist is the keys for each value. For example for the Japan or last line of the file. The dictionary should be
CountryName':'Japan','LifeExp': and so on This will require that numerical data be converted from text into actual data. The goal here is use all that
you have learned to create the dictionary. Hint, the easiest way to to this is two create a dictionary from two list. The desired output should look like:
Country: CountryName' : 'CongoDemRep'
'LifeExp':
'BirthRate':
'GNI' :
'Development': 'Developing'
'Country: CountryName': 'India',
'LifeExp':
'BirthRate' :
'GNI' :
'Development': 'Developing'
You must generate a name, thus you are creating a dictionary of dictionaries. This should use one for loop. Lastly, print the dictionary as the final task for this
problem.
in python
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started