Count the digits
easyBasics10 XP
Return how many digits the whole number n has (ignore a minus sign). 0 has one digit.
Examples
- Input: n = 12345Output: 5
- Input: n = 0Output: 1
Examples use JSON: true/false/null are True/False/None in Python.