Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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

num = int(input())
count = 0
while num > 0:
  count += 1
  num = num // 10
print(count)
 
PREVIOUS NEXT
Tagged: #number #digits #integer #python #converting #string
ADD COMMENT
Topic
Name
2+9 =