UPDATE:
I want python to print the next line like t+1 in the excel file into python output window when a condition is met . I believe the problem lies in this part of the code
print "FA",row[0], ','.join(row[1:])
This prints the present day I need python to print the next day (t+1)
I tried print "FA",row[0], ','.join(row[1:]).nextline()
but that does not work
for example lets say the excel file has
35F 1,0,1,0,1,1,1
66F 1,0,1,0,0,0,0
35F 1,0,1,0,1,1,1<-- at this moment python prints this part
66F 1,0,1,0,0,0,0<--- **But I want python to print this {66F 1,0,1,0,0,0,0} this is the t+1**
Furthermore, here is the full code
import csv
with open('2015weather.csv', 'r') as file1:
val = list(csv.reader(file1))[3]
with open('FAsince1900.csv', 'r') as file2:
reader = csv.reader(file2)
reader.next() # this skips the first row of the file
# this iteration will start from the second row of file2.csv
for row in reader:
if row[1:] == val:
print print "FA",row[0], ','.join(row[1:])
UPDATED 2: