mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-18 17:20:16 +00:00
changing end character in print statement
This commit is contained in:
parent
3e623c1476
commit
be16a1ef9b
|
@ -9,10 +9,11 @@ def _print_dist(dist, v):
|
|||
print("The shortest path matrix using Floyd Warshall algorithm\n")
|
||||
for i in range(v):
|
||||
for j in range(v):
|
||||
end_char = "" if j == v - 1 else "\t"
|
||||
if dist[i][j] != float("inf"):
|
||||
print(int(dist[i][j]), end=" ")
|
||||
print(int(dist[i][j]), end=end_char)
|
||||
else:
|
||||
print("INF", end=" ")
|
||||
print("INF", end=end_char)
|
||||
print()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user