Question: Python Task 1 It is important to be familiar with the functions of dictionary: items0, keys), values0, write a program to use all these functions
Python

Task 1 It is important to be familiar with the functions of dictionary: items0, keys), values0, write a program to use all these functions Notes: Dictionary has two ways to initialize data dictO data['school']- 'College' datal'address']-1000 data( 'phone'] = ,(1 1 1 ) 111-11 1 1 , data 'school': 'COllege', 'address': ' 1000 Main Ave, City, State 10000', 'phone': (1) 111-1' Print the results as follows by accessing the defined dictionary. school: College address: 1000 Main Ave, City, State 10000 phone: (111) 111-1111 Task 2 Main Ave, City, State 1000 Use json to store above dictionary in task-2 and then print item, key and values. Notes: This task tells how to store a dictionary object to a file and then load the dictionary object from the file. In python, object of any type can be mostly saved in json format to a txt file. You need to be familiar with the following two json functions json.dumps(object), which dumps an object to a json format (string), json.loads(a json format string), which loads a json format string back to the original object. We do not care about if the original object is list, dictionary or others. json.dumps(0 can automatically recognize. Note, json.load(object) only can only load an object, not a file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
