Oct-11-2018, 09:00 PM
Ok-Got it!.
So the result (output) is now considered an array? The output 'Array' looks the same as the list output.
So the result (output) is now considered an array? The output 'Array' looks the same as the list output.
data_list = [] with open("student_advisees_testdata.csv",'r') as csv_file: csv_reader = csv.reader(csv_file) next(csv_reader) for line in csv_file: line = line.split(',') data_list.append(line) print(data_list) # student = Array(len(data_list)) # index = 0 # for index in range(len(data_list)): # student[index] = data_list[index] # print(student) student = Array(len(data_list)) for index, item in enumerate(data_list): student[index] = item print(student)data_list:
[['104', 'Todd', 'Jeffries', 'B25590S', '1/11/16', 'Williams', '2017SU', '3.9\n'], ['47', 'Morty', 'Evans', 'B25590C', '8/21/17', 'Williams', '2017FA', '3.1\n'], ['257', 'Jennifer', 'Reynolds', 'B25590N', '1/17/17', 'Williams', '2017FA', '2.9\n'], ['1707', 'Twan', 'Jelens', 'B25590C', '8/15/16', 'Williams', '2017SP', '3.3\n'], ['1865', 'Paul', 'Knapp', 'B25590S', '8/15/16', 'Williams', '2018FA', '3.4\n'], ['2104', 'Michelle', 'Cashwell', 'B25590C', '8/15/16', 'Smith', '2017SP', '3.25\n'], ['2214', 'Bruce', 'Ciani', 'B25590N', '8/15/16', 'Williams', '2017SP', '2.9\n'], ['2215', 'Mike', 'Carmella', 'B25590C', '8/15/16', 'Williams', '2018SP', '3.8\n'], ['2838', 'Gene', 'Balzano', 'B25590C', '5/30/17', 'Williams', '2018FA', '2.7\n'], ['3104', 'Steve', 'Abrams', 'B25590S', '8/21/17', 'Williams', '2018FA', '3.15']]student(Array?)
[['104', 'Todd', 'Jeffries', 'B25590S', '1/11/16', 'Williams', '2017SU', '3.9\n'], ['47', 'Morty', 'Evans', 'B25590C', '8/21/17', 'Williams', '2017FA', '3.1\n'], ['257', 'Jennifer', 'Reynolds', 'B25590N', '1/17/17', 'Williams', '2017FA', '2.9\n'], ['1707', 'Twan', 'Jelens', 'B25590C', '8/15/16', 'Williams', '2017SP', '3.3\n'], ['1865', 'Paul', 'Knapp', 'B25590S', '8/15/16', 'Williams', '2018FA', '3.4\n'], ['2104', 'Michelle', 'Cashwell', 'B25590C', '8/15/16', 'Smith', '2017SP', '3.25\n'], ['2214', 'Bruce', 'Ciani', 'B25590N', '8/15/16', 'Williams', '2017SP', '2.9\n'], ['2215', 'Mike', 'Carmella', 'B25590C', '8/15/16', 'Williams', '2018SP', '3.8\n'], ['2838', 'Gene', 'Balzano', 'B25590C', '5/30/17', 'Williams', '2018FA', '2.7\n'], ['3104', 'Steve', 'Abrams', 'B25590S', '8/21/17', 'Williams', '2018FA', '3.15']]