chagning tab to double space for doctest

This commit is contained in:
Ajmera, Mahita SI/HZR-IDSA 2024-10-17 12:07:11 +02:00
parent 05e81d5724
commit d103325a63

View File

@ -9,7 +9,7 @@ def _print_dist(dist, v):
print("The shortest path matrix using Floyd Warshall algorithm\n") print("The shortest path matrix using Floyd Warshall algorithm\n")
for i in range(v): for i in range(v):
for j in range(v): for j in range(v):
end_char = "" if j == v - 1 else "\t" end_char = "" if j == v - 1 else " "
if dist[i][j] != float("inf"): if dist[i][j] != float("inf"):
print(int(dist[i][j]), end=end_char) print(int(dist[i][j]), end=end_char)
else: else:
@ -48,9 +48,9 @@ def floyd_warshall(graph, v):
>>> dist, _ = floyd_warshall(graph, 3) >>> dist, _ = floyd_warshall(graph, 3)
The shortest path matrix using Floyd Warshall algorithm The shortest path matrix using Floyd Warshall algorithm
<BLANKLINE> <BLANKLINE>
0 3 INF 0 3 INF
2 0 INF 2 0 INF
9 7 0 9 7 0
>>> dist == expected >>> dist == expected
True True
""" """