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.
not work
Would it be better to use
''
thanNone
?This comment is hidden because it contains spoiler information about the solution
I was baffled by this signature of the
translate
method until I realized "Python" here means Python 2.superb :D
You can initialize i to 1 as a minor optimization. Adding 0 to the sum isn't necessary.
it works in python 2, but not in 3
Can you please publish your code? This solution works fine for me, so I'm even eager to know what is the reason it doesn't work for you.
This looks like a great solution, however, I tried this on my own machine and got the following error:
Traceback (most recent call last):
File "", line 1, in
TypeError: translate() takes exactly one argument (2 given)
Is there a piece of the solution missing?
This comment is hidden because it contains spoiler information about the solution
These days I've learned a lot about reduce method. Thanks for this clever solution !