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.
cheater
you play with aim here
i just ran this code in chat gpt and it call it old style python =) sounds funny
"""is a list comprehension that formats each line from the lines list into a numbered string using the old-style Python string formatting (% operator). Let’s break it down step by step.© """ chatGPT
This comment is hidden because it contains spoiler information about the solution
Had no idea this could get solved like this, thanks for the trick. Took me time to wrap my head around it and hopefully i get to use it in the future with problems that needs intricate solving!
Another straightforward and concise code. I had two loops on mine which increased the run time. Nice one!
nice to know this
just another "god damnit why couldn't I think of that" moment on codewars
i think this is good approach to append a '_' on odd strings, makes it more readable than trying to handle it
List comprehension is slightly faster because it stays within the C binaries.
Very clever, but hard (for me) to read. But after checking, I have a doubt that your code will work correct in case PO~~O~O in example. You should delete also P imho? I can't understand how it works, canU explain?
thing is, endding up with this is not that simple. It requires a few insights/realizations about the problem you're actually facing (see explanations there)
This might be one of the strongest simple solutions I've seen so far hahaha. Sometimes it really is too easy to overcomplicate these things.
sorry about that... x)
Hrrrk
I did the same but created a new list, you are modifying the global variable which is blasphemy!
Loading more items...