I am reading data from a CSV file (xyz.CSV) which contains below data:
col1,col2,col3,col4 name1,empId1,241682-27638-USD-CIGGNT ,1 name2,empId2,241682-27638-
Hope it clears the issue
import csv file=open( "xyz.CSV", "r") reader = csv.reader(file) for line in reader: t=line[0]+","+line[1] print (t)