Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT V = 5 NEW_LINE adj = [ [ ] for i in range ( V ) ] NEW_LINE adj = addEdge ( adj , 0 , 1 , 10 ) NEW_LINE adj = addEdge ( adj , 0 , 4 , 20 ) NEW_LINE adj = addEdge ( adj , 1 , 2 , 30 ) NEW_LINE adj = addEdge ( adj , 1 , 3 , 40 ) NEW_LINE adj = addEdge ( adj , 1 , 4 , 50 ) NEW_LINE adj = addEdge ( adj , 2 , 3 , 60 ) NEW_LINE adj = addEdge ( adj , 3 , 4 , 70 ) NEW_LINE printGraph ( adj , V ) NEW_LINE DEDENT