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.
This comment is hidden because it contains spoiler information about the solution
Does it make much of a difference here? It's passed by value for a one line function.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Fair enough on the double digits. Small correction - the numbers the kata specifies are 1-9.
Meh. Agreed - but the function name to complete is 'maps' so it seemed like a hint to use map. Either works fine.
This needlessly joins result all the time.
Nice. You should however choose another variable for 'sum' - you are shadowing Python's "sum".
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 code looks ... shifty.
It's a generator expression. See https://peps.python.org/pep-0289/
This comment is hidden because it contains spoiler information about the solution
Does not work for multiple digits, e.g. Fails with
'thr3ee one1 tw20nty twe2nty4for'
Neither does it work for e.g. with puntuation.
Also sorts everything twice. Would recommend against.
Fails with e.g.
['w', 'w', 'w', 'w', 'w', 'w', 'w']
Loading more items...