Please for a multiDiGraph in networkx with edge represented by the tuple in the list edge, how can I access or print out the attribute elements in the dictionary of attributes e.g. how can i print out length or type or lanes etc for a multiDiGraph
i = [(1001, 7005,{'length':0.35, 'modes':'cw', 'type':'99', 'lanes':9})]
The print statement below works for a Digraph but gives an error for the MultiDiGraph
print i, X[i[0]][i[1]]['length']
Thank you
If I understand what you want then you can use
get_edge_data
: