Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Some predicates return non boolean values (like 0 and 1).
In python "is" compares identities of two objects and == compares values.
That means if your predicate returns 1 and you check it with: "1 is True" that will return false. because they have different object id's
To avoid that you check by value with ==. because "1 == True" is True in python. they have the same value
Even better is if you avoid the == check completely like this: if predicate(elem, i): ... that's just cleaner code though, its logically the same as if predicate(elem, i) == True ...
If you still have questions, feel free to ask.