I have tried to find the length of the integer variable var
with this method,
var=1234567
k=0
while var>0:
var//=10
k+=1
print("len of the integer is=",k)
Is there a alternative way to do this?
I have tried to find the length of the integer variable var
with this method,
var=1234567
k=0
while var>0:
var//=10
k+=1
print("len of the integer is=",k)
Is there a alternative way to do this?