I want to write my output code in csv file in this way, first column in csv contain file name and second column contain the value of exetime (s2) , how can do that?
 inputpath = 'C:/Users/mach/Desktop/hh/c*.csv'
    for file in iglob(inputpath):
        s1 = time.time()
        size = function(file) 
        s2 = time.time() - s1 
        with open(r'C:/Users/mach/Desktop/exetime.csv','a') as f:
            writer = csv.writer(f)
            writer.writerow({file,s2})
 
    