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.
it's short, but the filter function call is equialent to [c for c in x if str.isdigit(c)] which has the disadvantage that it will go through the whole word and create an array even if there's only one digit and it can be the first character in the word. If we change the call to filter into this:
next(int(c) for c in x if c.isdigit()) this will create a generator which will in this usage will stop on first digit found...