def findDiameter(): diameter = 0 result = [] for node in g.nodes: for nodeTwo in g.nodes: path = node.unweightedShortestPath(nodeTwo) length = len(path) if(length > diameter): diameter = length result = path return result