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.
its nice
I think @AndrewB31415 was suggesting that there is a different approach that doesn't require iterating through a string of the input (*see his solution). But if you use this approach then you do need to convert the input number to an iterable.
This comment is hidden because it contains spoiler information about the solution
intuitive, readable, and completed without imports; unequivocally best practice
Terrific source
My Solution is nearly the same as yours.
My code is almost same as yours!