Skip to content

Instantly share code, notes, and snippets.

@bharathmuddada
Created April 17, 2021 12:42
Show Gist options
  • Save bharathmuddada/303ba73bdadcad58e87f5937c89f60ff to your computer and use it in GitHub Desktop.
Save bharathmuddada/303ba73bdadcad58e87f5937c89f60ff to your computer and use it in GitHub Desktop.
Count of Digits in Python
number = int(input())
counter =0
while number > 0:
number = number//10
print(number)
counter +=1
print("number of digits :",counter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment