for line in open(fname, 'r'):
if re.search('#', line):
#print(line)
pass
elif re.search('# segment: retract', line):
print(line)
print('break here')
break
else:
outfile.write(line)
The elif statement does not work, can anybody help me with a regexp that matches
"# segment: retract"
the code does not even enter the elif statement.
Thanks