4

I'm totally new to Python, and I'm trying to run my server but I'm getting this syntax error from the project I'm working on.

    def find_shortest_path(start: GraphNode, end, path=[]):
                                ^
SyntaxError: invalid syntax

To be clear, I didn't write the code, I'm just supposed to style the project but I don't know how else to see the app without running it in the server.

Justus Eapen
  • 1,139
  • 10
  • 22

1 Answers1

7

This code appears to be using function annotations which are only available in Python 3.X.

What version of Python are you using?

Community
  • 1
  • 1
jaynp
  • 3,275
  • 4
  • 30
  • 43