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.
please use a spoiler flag when discussing code / solutions. I added the flag
This comment is hidden because it contains spoiler information about the solution
if it works, it works.
can't complain.
wuaaouuuuuu
Python doesn't have arrays and the code above isn't creating a list either. It's creating a generator and the creation specifically takes almost no resource, since the values are generated lazily.
AFAIK the difference comes from the code above calling isdigit function a lot of times, whereas replace is only called 10 times. Keep in mind, that both of the functions are highly optimized and written in C, so that's why the the code with more function calls and more python is slower. That also for example causes some O(n^2) algorithms to run faster in python, than an O(n log n) alternative.
This got my head spinning! tried it with other examples and it worked! Haba..
Thats crazy
ahh damm this i didnt thought abt it . intresing approch i like it . but i would want someoen to help me understand this smart one
This is the way.
wha
Very nice but limited, agree with first comment
I liked it as -best practice-, because the best practice it is!
not correct solution ,
the gravity means that everything move down towards land ,
but your solution just flip the list down ,
for example if you try lst of any other characters your solution will not work,
the right solution is to make the characters move down
Very clever
Look at my solution to see what I mean
Loading more items...