Data Science, Machine Learning, AI, Mathematics, Python.
import matplotlib.pyplot as plt # Create an empty graph G = nx.Graph() # Define a list of nodes nodes = ['Hamed', 'Moon', 'Raza', 'Danish', 'Basit'] # Add nodes one by one to the graph for node in nodes: G.add_node(node) # Define a list of edges edges = [('Hamed', 'Moon'), ('Moon', 'Raza'),