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.
I think your int-str conversion is useless.
What
filter
does is filtering out the items which do not satisfy the prerequisite(thelambda
) ina
.The process is:
filter
picks the items ina
one by one and tests them by thelambda
expression.Each time,
lambda
accepts one item and returns a boolean value,filter
will keeps down the item iflambda
returns True or drops it while False.The items returned from
filter
are picked froma
directly(but not returned bylambda
) and thelambda
expression should always returns boolean value.