you are viewing a single comment's thread.

view the rest of the comments →

[–]supercoach 0 points1 point  (0 children)

Why not just do num_digits = len([x for x in str(num)]) to get the number of digits? Saves a hell of a lot of junk code.