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.
a
I don't know how that would be more time efficient since the time complexity is O(n * c) where c is the number of vowels. Ie it has to loop through the entire string for every value because of replace method. The given solution is O(n) complexity.
'Hello guest' then ;-)
final boss of codewars
amazing!!!! :)
Oh neat!
We learned new stuff.
First and foremost "return n if n < 10" is the base case.
The map function applies a given function (in this case "int") to every item of something that is iterable. -> new for me!
Using the string function on the input n, you turn n into a string which is iterable. Therefore the map functiion can now apply a given function to each character of a string. -> the clever part!
Once the map function is done applying int to every digit, it is then all summed together.
WHAT
This comment is hidden because it contains spoiler information about the solution
Dude, why your code return "<generator object dis_trol at 0x00000186174DBB90>"
instead of a string
Same. Best platform for learning imo. Mad I didn't sign up sooner.
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
good one
This comment is hidden because it contains spoiler information about the solution
That a very interesting solution you have provided here, really made me think more efficient
This comment is hidden because it contains spoiler information about the solution
Loading more items...