Skip to content
Advertisement

Python list comprehension, invalid syntax [closed]

In some part of my program i have this code:

JavaScript

Traceback

JavaScript

Advertisement

Answer

You did not close the next() function call. Try using an IDE, it will highlight brackets and parenthesis for you to show where you might have forgotten to close one.

JavaScript

Should be

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement