import csv


def createCSV(data,headers,fileName):
    """
    Input: data - dict to read in,
           headers - list of csv headers,
           fileName - str for csv file name
    Output: Writes csv to directory under fileName
    """
    with open(fileName,mode='w',newline='',errors="ignore") as csvFile: 
        #CSV writer from dict
        csvWriter = csv.DictWriter(csvFile,fieldnames=headers) 
        #Writing headers 
        csvWriter.writeheader() 
        #Writing data 
        csvWriter.writerows(data) 
    return True