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
Thanks @hobovsky :) that makes sense!
This solution was posted when Python 2 was available. After Python 2 was removed this solution should become invalid, but for some kata, especially when it has really many solutions, some can survive invalidation process. They will be gradually disappearing though.
Home page dashboard displays all posts, even posted under solutions one cannot see.
Yes, about that since I am new here (literally couple of days). How does solution show here if it cannot run here? Can you post a solution here without running a solution? I don't see an option to post solution, I thought these are automatically added here once you have successfully solved a kata with that solution - if so then I don't see an option to choose python version.
Also why we need to mark a comment spoiler when discussing on a thread under a solution already out there? If anyone can see the solution, they can run it and see the error as well - I don't see I am adding anything here that could be flagged as spoiler.
That's the point, that extra adjustment is not required. Below would work just fine:
return sum(int(d) ** (i) for i, d in enumerate(str(a),1)) == a
That's a Python 2.7 solution, read the comment in the solution or the posts below, and don't forget to mark your post as having spoiler content next time, please.
This comment is hidden because it contains spoiler information about the solution