i made this small program to read whats inside a comma separated file (exel)and it works but i get few additional characters i need help to fix it :(
def get_csv_as_table(filename, delimiter):
csvFile=open(filename)
for row in csvFile:
#row=row.strip()
row=row.split(delimiter)
userArray.append(row)
csvFile.close()
return userArray
get_csv_as_table(userFileName, userDelimiter)`
and the output i get is
Input the file name :- meow.csv
input the delimiter :- %
[['Cat', 'Â\xa05', 'Â\xa0Â\xa020', 'Â\xa0meow\n'], ['Dog', 'Â\xa020', 'Â\xa020', 'Â\xa0woof\n'], ['Cow', 'Â\xa0300', 'Â\xa022', 'Â\xa0moo']
the output i want to get is
Input the file name :- meow.csv
input the delimiter :- %
[[“Cat”, 5, 20, “meow”], [“Dog”, 20, 20, “woof”], [“cow”, 300, 22, “moo”]]