code: def write_triples(filename, triples, delimiter=DEFAULT_DELIMITER, triple_order="hrt"):
      
      with open(filename, 'w') as f:
          for t in triples:
              line = t.serialize(delimiter, triple_order)
              f.write(line + "\n")
docs: write triples to file.