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.
just the zen of python ;)
but the point I was focusing is the build-in filter
Enveloping a function into a class for no particular reason sure makes a lot of sense ;)
none of you read the title!
where is that filter???
checkout my solution!
this solution does also use a foor-loop
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
That's not what the description says. The input consists of non-negative ints and strings and you should throw out all the strings. No need to check for negative ints.
it should be non-negative....
I don't think either is more right. Yonog1's answer exactly matches the requirement "returns a new list with the strings filtered out" whereas yours techinically returns a new list of only integers. Assuming the input is limited to integers and strings as stated, either works.
Please mark your post as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution
nice and clear what your list interpration is doing.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution