Use print
.
If you are using Python 2.x print
is a keyword:
result = select(badlist)
print result
In Python 3.x print
is a function and you must use parentheses:
result = select(badlist)
print(result)
You also have at least two other errors:
- Your function parameter is called
badlist
but you never use it. - The
==
operator is equality comparison. You need=
for assignment.
Also your algorithm will be very slow, requiring O(n2) operations.