From 84c97dae332b27ff49ba0c82326fa94751671a4e Mon Sep 17 00:00:00 2001 From: "Ajmera, Mahita SI/HZR-IDSA" Date: Thu, 17 Oct 2024 11:03:24 +0200 Subject: [PATCH] removing blank lines from print statement --- graphs/graphs_floyd_warshall.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/graphs/graphs_floyd_warshall.py b/graphs/graphs_floyd_warshall.py index 2aa111cc2..d7fd62e46 100644 --- a/graphs/graphs_floyd_warshall.py +++ b/graphs/graphs_floyd_warshall.py @@ -6,7 +6,7 @@ weighted directed graph that can have negative edge weights. def _print_dist(dist, v): - print("\nThe shortest path matrix using Floyd Warshall algorithm\n") + print("The shortest path matrix using Floyd Warshall algorithm") for i in range(v): for j in range(v): if dist[i][j] != float("inf"): @@ -46,9 +46,7 @@ def floyd_warshall(graph, v): ... [float('inf'), float('inf'), 0] ... ] >>> dist, _ = floyd_warshall(graph, num_vertices) - The shortest path matrix using Floyd Warshall algorithm - 0 2 INF 1 0 INF INF INF 0