zlacker

[return to "My Favorite Programming Problem to Teach: Digit Length"]
1. _paste+Id[view] [source] 2019-11-11 00:48:19
>>jstrie+(OP)
Why not:

  def digit_len(n): 
    return len(str(n))
◧◩
2. TomGul+iF[view] [source] 2019-11-11 08:08:47
>>_paste+Id
You need to minus 1 if the number is < 0
[go to top]