Question: Help me code this in python. Create a module named dict_io, which will contain two functions. These two function will save and load a dict

Help me code this in python.
Create a module named "dict_io", which will contain two functions. These two function will save and load a dict of integers in a text file. In this dictionary, both keys and values are integers. The format of the file is up to you, only make sure that the load function can load what the save function has saved. 1. [2.5p] Implement function save_dict, which takes two arguments - a dict of integers and a file path, and will store the dict under given path. 2. [1p] In function save_dict, if the file under given path already exists, save the data under a different path, prepending 'new_' to the base of the file name (i.e. '/foo/bar/file.txt' '/foo/barew_file.txt'). You do not need to check whether the new path exists. 3. [2.5p] Implement function load_dict, which takes a single argument, a file path, and returns a dict loaded. If the file does not exist, return an empty dict
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
