#get the user input
      Integer = int(input('Enter an integer :'))
      #initialize the variable
      #typecast the integer to string
      #store the string
      String = str(Integer)
      #use len() functiomn to find the length of a String
      #print it
      print(len(String))
      

      Python language logo
      Calculate number of digits in an integer

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.