Jul-13-2020, 09:10 AM
hi im currently working on a small project to make a bill bored chart and its on and we have to read the artists from a "csv" file we cannot use "import csv" methords and im still in the basic structure of reading the csv file but when i input the name and the delimiter it does not print in the array it just prints blank array this is what i have done so far
code
code
userFileName=input("Input the file name :- ") userDelimiter=input("input the delimiter :- ") userArray=[] def get_csv_as_table(filename, delimiter): csvFile=open(filename) for row in csvFile: #row=row.strip() row=row.split(delimiter) userArray.append(row) print(userArray) get_csv_as_table(userFileName, userDelimiter)