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.
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 ?
He made some extra spaces and lose some necessary ones. You can check it in any "pep8 beautifier".
What did he ignore in terms of PEP8?
Fixed for python
This comment has been deleted.
Sorry. Fixed.
spoiler
Ethernal classic! :)
This comment is hidden because it contains spoiler information about the solution
Today I learned about from_bytes/to_bytes.
Thank you!
I made some researching and it looks like you're right. In that case tuple should be little bit faster.
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.
Nice underestimated solution!
straightforward solution, but not the best practice
Loading more items...