Generated Python code

Hi.

I am fairly new to Postman and even newer to Python, but have a few collections working for me in Postman. I have used the Code tool to generate “Python - Requests” code but several Python interpreters have reported Syntax Errors. This may be more of a Python question than Postman, but is the code generator normally reliable? It’s only 30 lines long and appears simple enough.

Thanks in advance.
Greg