Accessing single attribute of node from multitributes

2 views
Skip to first unread message

MUHAMMAD WAQAS SWATI

unread,
Aug 2, 2022, 8:02:06 AM (7 days ago) Aug 2
to networkx-discuss
I have a node say student with attributes like name, age, class, grade etc.

G = networkx.Graph()

G.add_node('Student', {'name': 'ABC', 'age': 24, 'class'='graduation', 'grade'='B'})

I want to access only one attribute of a node and store it in a variable to use it later. How I can do this?

Kind Regards
Reply all
Reply to author
Forward
0 new messages