Answer the question
In order to leave comments, you need to log in
Why does paycharm write in the text of the error that it is impossible to measure the length of a number, although the list is clearly visible, not the number?
Answer the question
In order to leave comments, you need to log in
Because a number is not a string. It has no length.
If you need to count the number of decimal places in a number, then do this:
len(str(12345)) # 5
First you need to convert the number to a string, and only then measure the length.
Here is the code.
temp = str(temp)
print(len(temp))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question