def digit_len(n): return len(str(n))
> As a result, solutions using strings are disallowed on problem sets and quizzes until they are taught.