networkx.write_multiline_adjlist
networkx.read_edgelist
Read and write NetworkX graphs as edge lists.