def read_txt(filename):
  """Read file to list of lines."""
  lines = []
  with gfile.GFile(filename, "r") as txt_file:
    for line in txt_file:
      line = line.decode().rstrip()
      lines.append(line)
  print("Loaded %s lines from %s." % (len(lines), filename))
  return lines
Read file to list of lines.
language/compgen/csl/tasks/smcalflow/tools/merge_dataset.py