Demo entry 6626543

100

   

Submitted by anonymous on Jun 26, 2017 at 00:50
Language: Python 3. Code size: 323 Bytes.

exclude_class=['not', 'negation']
with open('infile','r') as f1, open('outfile','w') as f2:
     for line in f1.readlines():
	     write_to_file=treu 
		 for word in line.split():
		     if word.rstrip() in exclude_class:
			     write_to_file=false 
				 break
	     if write_to_file:
	 
	         f2.write(line)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).