()
| 7 | reader = csv.DictReader(data) |
| 8 | |
| 9 | def output_json(): |
| 10 | contents = json.dumps([row for row in reader], indent=4) |
| 11 | with open('data.json', 'w') as file: |
| 12 | file.write(contents) |
| 13 | |
| 14 | def output_xml(): |
| 15 | xml = ['<?xml version="1.0" encoding="UTF-8"?>'] |