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.
to be clear, this is not the best solution as it uses O(n^2 log n) time; Blind4Basics solution is better.
This comment is hidden because it contains spoiler information about the solution
Best answer
This is the same cheese I did.
I did not vote it as clever because an fstring could be considered a fundamental python feature.
IMO clever code should be the use of obscure stuff so for Python 3 this should be best practice.
This comment is hidden because it contains spoiler information about the solution
nice
...
Never used python2
Thanks !
Because this is Python 2.
In Python 3 you should use next(filter(...)) instead of filter(...)[0] and list(filter(...)) in order to return a list, not a filter object.
Pls why copying your exact code to understand it gives this result :
(beginning erased)
'filter' object is not subscriptable
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
Genius solution!
Similar to my solution.
Loading more items...