14.11.1.1. networkx.readwrite.graph6.parse_graph6

networkx.readwrite.graph6.parse_graph6(string)[source]

Read a simple undirected graph in graph6 format from string.

Parameters:

string : string

Data in graph6 format

Returns:

G : Graph

Raises:

NetworkXError

If the string is unable to be parsed in graph6 format

References

[R1269]Graph6 specification <http://users.cecs.anu.edu.au/~bdm/data/formats.html>

Examples

>>> G = nx.parse_graph6('A_')
>>> sorted(G.edges())
[(0, 1)]