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
It makes no sense to check "and ans" because ans is going to be at least '#' and so it's always true.
Nitpicks: 1. you could use list comprehension which I believe is not necessarily unreadable (i.e. it doesn't violate "just because you can doesn't mean you should") 2. no need to calculate len(string) every time.
But overall, +100 for "just becuase you can doesn't mean you should". Production code is generally not a place for showing off, it's also a tool to communicate with other people.
Well, calculating 7^100 a hundred times is not very CPU-intensive..
(early optimization is the root of all evil :-)
Well, there's no need to calculate len(str(value)) every time (just for sake of having a one-liner solution).