Reputation: 67
I know now in Python 3 Print is a function, but my print, I believe, is in accordance with the syntax, but still giving error Syntax
print (json.dumps(data, indent=4, sort_keys=True))
The output
print ((json.dumps(data, indent=4, sort_keys=True)))
^
SyntaxError: invalid syntax
Upvotes: 0
Views: 1579
Reputation: 167
If the debugger shows at the print while saying that it is an SyntaxError, then you mostly forgot a bracket in the line before it. Can we see some more lines? Like 1 or 2 before it?
Upvotes: 1