python
import networkx as nx
G = nx.Graph()
G.add_node("A")
G.add_node("B")
G.add_node("C")
G.add_edge("A", "B")
G.add_edge("B", "C")
G.add_edge("C", "A")
print(nx.info(G))
nx.draw(G, with_labels=True)
plt.show()
shell
pip install networkx matplotlib