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)
csvFile.close()
print(userArray)
return userArray
get_csv_as_table(userFileName, userDelimiter)
the out put i wanna get is diffrent from the one i want to get and i cant find why
output i get
Input the file name :- meow.csv
input the delimiter :- %
[['Cat', 'Â\xa05', 'Â\xa0Â\xa020', 'Â\xa0meow\n'], ['Dog', 'Â\xa020', 'Â\xa020', 'Â\xa0woof\n'], ['Cow', 'Â\xa0300', 'Â\xa022', 'Â\xa0moo']]
output i want to get is this
[[“Cat”, 5, 20, “meow”], [“Dog”, 20, 20, “woof”], [“cow”, 300, 22, “moo”]]
plase let me know what i have to change or add to get the expected output