For this Question: You are given a number n. You need to find the count of digits in n.The first line of input contains T denoting the number of test cases. Each testcase contains one line of input containing n.
For Python, Language Just Completes the function.

<b>Constraints:</b>
1 &le; T &le; 100
1 &le; n &le; 10<sup>8</sup>For each testcase, in a newline, print the count of digits in n.Input:
2
1
99999
Output:
1
5

<b>Explanation:</b>
Testcase 1: The number of digits in 1 is 1.
Testcase 2: The number of digits in 99999 is 5, I have written this Solution Code: def totalDigits(n):
    cnt=0
    while(n>0):
        cnt +=1
        n//=10
    return cnt, In this Programming Language: Python, Now tell me if this Code is compilable or not?