Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
