@open_file(1, mode='wb')
def write_edgelist(G, path, comments='#', delimiter=' ', data=True, encoding='utf-8'):
 for line in generate_edgelist(G, delimiter, data):
  line += '\n'
  path.write(line.encode(encoding))

@ open_file ( 1 , mode = 'wb' ) def write_edgelist ( G , path , comments = '#' , delimiter = ' ' , data = True , encoding = 'utf-8' ) : for line in generate_edgelist ( G , delimiter , data ) : line += '\n' path . write ( line . encode ( encoding ) )
write graph as a list of edges .