Use print .
If you are using Python 2.x print , this is the keyword:
result = select(badlist) print result
There is a function in Python 3.x print , and you should use parentheses:
result = select(badlist) print(result)
You also have at least two other errors:
- Your functional parameter is called
badlist , but you never use it. - The
== operator is an equality comparison. You need = for the destination.
Also your algorithm will be very slow, requiring O (n 2 ) operations.
Mark byers
source share