May-17-2018, 05:54 AM
here is my codes,I wrote a function which should be able to read a csv file and parse it into some useful form.
import csv def load_atlas(filename): edited_file = [] with open('filename', 'r') as csv_file: csv_reader = csv.reader(csv_file, delimiter='|') for lines in csv_reader: edited_file.append(lines) return edited_file load_atlas(ala-acton.txt)my problem is whenever i passed a filename into this function, it returns an error
Error:NameError: name 'ala' is not defined