i have a csv file from where in i read the data and store individual coloumns in list , but for the last coloumn i am getting \n in the list . i want to get rid of that .
f = open('datagen.txt')
for lines in f:
line = lines.split(',')
l1.append(line[0])
l2.append(line[1])
l2 contains like abcd\n in it .. i dont want the newline character .