I need to search through my csv files and if the input value equals the values inside the field of 'Number'in my csv then it should print the entire line.
Number, Product, Year
1,JK,2016,
2,TL,2016,
3,HNK,2016,
Tried this code:
number = input('Enter SNo to find: ')
reader = csv.reader(open('new.csv','r'))
for row in reader:
if number == row[0]:
print(row)
But getting error:
IndexError: list index out of range