get number of digits in an integer python without converting to string

Solutions on MaxInterview for get number of digits in an integer python without converting to string by the best coders in the world

showing results for - "get number of digits in an integer python without converting to string"
Andromeda
10 May 2018
1num = int(input())
2count = 0
3while num > 0:
4  count += 1
5  num = num // 10
6print(count)