Home / Expert Answers / Computer Science / create-a-solution-that-accepts-an-input-identifying-the-name-of-a-csv-file-for-example-34-input1-csv-pa836

(Solved): Create a solution that accepts an input identifying the name of a CSV file, for example, "input1.csv ...



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 {'key': 'value', 'key': 'value', 'key': 'value'} {'key': 'value', 'key': 'value', 'key': 'value'} Sample Input/Output: If the input is input1.csv then the expected output is {'a': '100', 'b': '200', 'c': '300'} {'bananas': '1.85', 'steak': '19.99', 'cookies': '4.52'}



We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe