diff options
author | Jarrod Millman <jarrod.millman@gmail.com> | 2022-04-09 12:14:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-09 12:14:50 -0700 |
commit | bb894f6275d8dd06a33b11a479637048790d00a1 (patch) | |
tree | 9cc2a430019076250a377038a174c82e6367b45d /README.rst | |
parent | be25ce35d7b456e10825fd48205cee929035d9a9 (diff) | |
download | networkx-bb894f6275d8dd06a33b11a479637048790d00a1.tar.gz |
Run black on docs (#5513)
* Run black on docs
* Remove redundant dependencies
* Format docs
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -27,15 +27,15 @@ Simple example Find the shortest path between two nodes in an undirected graph: -.. code:: python +.. code:: pycon >>> import networkx as nx >>> G = nx.Graph() - >>> G.add_edge('A', 'B', weight=4) - >>> G.add_edge('B', 'D', weight=2) - >>> G.add_edge('A', 'C', weight=3) - >>> G.add_edge('C', 'D', weight=4) - >>> nx.shortest_path(G, 'A', 'D', weight='weight') + >>> G.add_edge("A", "B", weight=4) + >>> G.add_edge("B", "D", weight=2) + >>> G.add_edge("A", "C", weight=3) + >>> G.add_edge("C", "D", weight=4) + >>> nx.shortest_path(G, "A", "D", weight="weight") ['A', 'B', 'D'] Install |