Export a simple Dictionary into Excel file in python
问题 I am new to python. I have a simple dictionary for which the key and values are as follows dict1 = {"number of storage arrays": 45, "number of ports":2390,......} i need to get them in a excel sheet as follows number of storage arrays 45 number of ports 2390 I have a very big dictionary. 回答1: Sassikant, This will open a file named output.csv and output the contents of your dictionary into a spreadsheet. The first column will have the key, the second the value. import csv with open('output.csv