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 is not even an issue with spec, the kata generates the expected answer before passing the argument to the user's function. In this case, the user is mutating the list as they iterate through it, causing issues. I'm closing this issue.
res = lst
does not create a copy and does not prevent changes of the original input list. If you create the copy correctly, your solution will work.The issue is not as much with tests, but more with spec.
This comment is hidden because it contains spoiler information about the solution
I was thinking the same thing. Kind of just started learning python, I hope I could do that someday :')
I realized our answers were similar here, I mean, most of them are, but still xD
But you're only importing, right? I mean, you aren't returning anything nor receiving the arguments... Can you explain bit more, please?
well using list comprehension is more efficient as it only iterate through the characters one time but in this solution it iterate through the character 10 times, because .replace() iterate through the string in the background.
I agree
Yep, math prevails
What do you mean?
This is an easy kata, I feel like I remember solving a 8kyu version of this same. exact. problem...
Take a look at the top solutions
How is this 7kyu...
This is not a 7kyu kata...
why semicolon on line 3, when you declare the tot_occur variable?
how is this clever?
Google search
Loading more items...