I'm trying to get my data to display in a nice format using a table, all other google searches give me really confusing over complicated solutions and i was wondering if there was an easier way of doing it. I'm using using this code:
print("no. of cities | Depth-first | Breadth-first | Greedy Search")
for num in n:
...
print("%d | %d | %d | %d | %d" %(n,depth_count,breadth_count,greedy_count, total))
Which gives me the result:
no. of cities | Depth-first | Breadth-first | Greedy Search | Total
5 | 24 | 24 | 10 | 58
6 | 120 | 120 | 15 | 255
...
but I would like:
no. of cities | Depth-first | Breadth-first | Greedy Search | Total
5 | 24 | 24 | 10 | 58
6 | 120 | 120 | 15 | 255
...
Any help appreciated.