Python please. Thank you!!
Task:
Create a solution that accepts an input identifying the name of a CSV file, for example, input1.csv. Each file contains two rows of comma-separated values. Import the built-in module csv and use its open function and reader method to create a dictionary of key:value pairs for each row of comma-separated values in the specified file. Output the file contents as two dictionaries.
The solution output should be in the format
{.n:x.nE:xn:x.} .n:x.n,:,.n:,x.}
Sample Input/Output:
If the input is
inputi.csv
then the expected output is
{':100,b:200,:300} {'bananas:1.85', 'steak':'19.99', 'cookies':4.52'
Alternatively, if the input is
input2.csv
then the expected output is
{:400,e:500,:600} {'celery':'2.81''milk':4.34',bread':'5.63'}
Input to program
input1.csv
Undo
Redo
Main.py
Load default template.
#import csv modute and calL open(), reader() 2#solution accepts input identifying name of CsV file (i.e., inputi.csv) 3#solution outputs each row of csv ftte contents as a aictionary of elements