I am interested in removing leading/trailing whitespace in a .csv file, and I was wondering if there's a better way to execute this:with open(csv_file.csv, rb) as infile:    r = csv.DictReader(infile)    fieldnames = r.fieldnames #Creates list of fieldnames    for row in r:        for f in fieldnames:            row[f] = row[f].strip()I am fine with using this method, but I was wondering if there's a way to circumvent using a nested for loop.
Stripping whitespace in a CSV file
python;csv