I\'m very new to programming, have been learning python from past 3/4 weeks and this is one of the assignments given.
Input
For those who like one-liners:
import csv import json json_data = [json.dumps(d) for d in csv.DictReader(open('file.csv'))]
Checkout this fiddle for a working example: https://pyfiddle.io/fiddle/5992b8f4-552f-4970-91b6-a52cdee16ebc/?i=true