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
Shame I can't jump to your solution to vote it up, not only it's really clever it's much faster than top voted and mine.
To be exact most "clever" solution is 9 (!) times slower than yours.
Hate the way Codewars promotes writing functions in slow wank style as "Clever Best Practices" :/
what is the explanation @FedyakinRoman ?
What did he ignore in terms of PEP8?
Fixed for python
spoiler
I'm by no means a Python expert, but in my understanding a tuple is a simpler and cheaper data structure than a list (because a tuple is immutable), and thus probably also faster.
And this was not required in the condition.
There was no range specified. But if there was, then the solution would be different.
Just ignore it. People are having fun trying to compress as much info as possible into a single line of code.
You know, kind of like "mine is bigger" only here shorter is better.