(Jan-22-2019, 01:54 PM)grandpapa10 Wrote: I indented the lines 4 spaces to the right.I said dedent to the left, not indent to the right. It has to be all the way to the left.
(Jan-22-2019, 01:54 PM)grandpapa10 Wrote: I got an error since "shorpath" hasnt been given a value!it has been given a value, but it takes 2 parameters start and end
Quote:def shortpath(self, start, end):
Currently the code does not show anything so you need to print it to see the results.
def main(): gg = Graph() path = gg.shortpath('C', 'I') print(path) if __name__ == '__main__': main()
Output:$ python3 test6.py
['I']
Recommended Tutorials: