Question: Using Python 3 3. You are given the the data dictionary below. Notice that the gap data are stored as strings. Fix data by replacing

Using Python 3
3. You are given the the data dictionary below. Notice that the gap data are stored as strings. Fix data by replacing the strings with the appropriate floats and then print the dict. You might try using a loop or a list comprehension. Edit Attachments data = {'year':[1990, 2009, 2010], 'gdp':['8.95', '12.56', '14.78']} for i in enumerate(data): data['gdp'] = float('gdp') print(data) ValueError Traceback (most recent call last)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
