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.
You are not right, beacuse the words have different lengths...
The one letter word 'i' should score 9.
The two letter word 'be' should score 7.
If you don't take away the 96, you would get 105 for 'i' and 197 for 'be'.
Newbie stoopid question here: It's really necessary the "-96" part? I mean, they're asking for the word, not for the score. The high score word will be ever the same proportionaly as all characters has +96. I am right? Thanks.
it looks nice, one liner.
I personnaly prefer manually iterating each letter to reduce complexity
Because it wants you to return the first greatest word.
This comment is hidden because it contains spoiler information about the solution
Eh, agree to disagree. Wouldn't call it "hacky", it's just not very neat. I'd personally find it easier to read a multiline solution
I've seen hacky code before - this isn't hacky in the least. If anything, it's the most idiomatic way to do this, imo.
Who voted best practises lmao? If I saw this in a codebase I'd cry
Still, outside of production, I love clever one liners - +1.
if 'aa b', why 'aa' in this answer, will select the first not select the second?
It is a time to learn lambda functions :)
why? ๐
Thanks.
It's a generator expression. See https://peps.python.org/pep-0289/
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...