length of int in python

len(str(n))  #n is a number

Here is what the above code is Doing:
1. We create a variable called ‘n’ and set it equal to the number 12345.
2. We create a variable called ‘digits’ and set it equal to the length of the string ‘12345’.
3. We print the value of the variable ‘digits’.

The output of the code above should be 5.