Jalur NetworkX antara dua node

import networkx as nx

path = list(nx.shortest_path(G, source=0, target=1))
print(path)
Smoking Snake