summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2022-04-09 12:14:50 -0700
committerGitHub <noreply@github.com>2022-04-09 12:14:50 -0700
commitbb894f6275d8dd06a33b11a479637048790d00a1 (patch)
tree9cc2a430019076250a377038a174c82e6367b45d /README.rst
parentbe25ce35d7b456e10825fd48205cee929035d9a9 (diff)
downloadnetworkx-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.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.rst b/README.rst
index f28fb8a9..7f5224e6 100644
--- a/README.rst
+++ b/README.rst
@@ -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