I have written a python generator expression as follows:
with open(input_file) as open_file:
print open_file
reader = csv.reader(open_file, delimiter="\t")
reader = (row for row in reader
if row[12] != "..." or
row[13] != "-" or
row[18] != "-" or
not re.search(r'p.', row[18]))
If like to exclude any rows where the conditions are True, so the ORs definitely apply and there is no nesting here. I have no syntactical errors but when I print row[18] I am returned "-" so something is wrong here. All of my ifs are actually being ignored. Any help is much appreciated.