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
This comment is hidden because it contains spoiler information about the solution
Функция выдает ошибку.
This is a really neat solution!
This comment is hidden because it contains spoiler information about the solution
Why didn't you add a "let" at the beginning of the loop
Logic is easier to understand and follow, but time complexity could grow to O(n^2) in the worst case.
how does this account for double spaces? I had to write a much longer script to account for them, this is a much more elegant solution but could you explain how it works around spaces?
Edit: Nevermind, I see it now. When splitting the string, any double spaces "seperate" an empty string that's included inside the list, so the double spacing is restored because when joining the list, a space is put in between the word and empty string, and again between the empty string and the next word.
It would
it will return False
6 characters longer than my solution :D (ignoring the newlines added for legibility)
He uses it to keep track of whether he's currently handling 10s, 100s, 1000s, etc.
hi! len(num) should be variable too as str(num), and list(str(num)) is unnessesary here. and enumerate can start from 1. And it is good solution!
How will the case values be evaluated when you are not comparing it with the parameter?
i think its better to use the least amount of the built in functions as we can to avoid pitfalls :3
I really like this code - it's helped me to understand the solution - it's really clear for a beginner like me - thank you!
Loading more items...