Hello evryone
I want to access the key of a particular edge(for example edge (1,2)) in a multigraph, but I am unable to do so.
Please help me out here.
Any help will be greatly appreciated.
Thanks

Post the relevant piece of code with suitable input data, expected results, explanation of the logic, error messages, how you tested it...

In the following code I want to access the key of edge (1,2)

import networkx as nx
    H=nx.MultiGraph()
    H.add_nodes_from([1,2,3,4,5])
    H.add_edge(1,2,key=2)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.