I\'ve been using the following code to create a weighted Networkx graph:
import matplotlib.pyplot as plt import networkx as nx G = nx.Graph() G.add_edge("a