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.
Wow...how far I have to go still.
I spent 15 minutes trying to understand how the part with '\n1'.join(... works. It was much easier than I thought.
the kata needs clarification but I think if it meant to return "bye" and not "e" then it should also return "hi" if "hi" is the only argument. otherwise it's inconsistent. what if the arguments were
("hello", [1, "world", [2, 3]])
? Should it return[1, "world", [2, 3]]
,[2, 3]
, or3
?Easiest, cleanest.
This comment is hidden because it contains spoiler information about the solution
yes
and this will return 2 --> 2.0
Cool, couldn't figure out where to put if/else in join !!! Thanks
groupby()
take iterable(sort of sequence) and return tuple of group key(str) and lazy iterator(itertols._grouper).So because its lazy it will give you a value only as in needed. But you can get sum of iterators values.
Then you need to create generator expression, which consist of
Hope i did it good.
nice use of recursion!
A zero-liner, anyone?
Modified, thanks!
thanks
Now it works.
Thank you!
Have you tried again? I changed the tests.
Loading more items...