def chain_files(paths):
 for path in paths:
  with open(path, 'r') as f:
   for line in f:
    (yield line)

def chain_files ( paths ) : for path in paths : with open ( path , 'r' ) as f : for line in f : ( yield line )
iterate through many files .