Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.  
  2. PRUNE  = 400
  3. INPUT  = 'E13.04-Filtered.fens'
  4. OUTPUT = INPUT.rstrip('fens') + '%dcp.fens'  % (PRUNE)
  5.  
  6. with open(INPUT, 'r') as fin:
  7.     with open(OUTPUT, 'w') as fout:
  8.         for line in fin:
  9.             if abs(int(line.split()[-1])) <= PRUNE:
  10.                 fout.write(line)