Can't execute len of float converted to str


I did some experimental with topic 8 STR ()
I can get printed output for

pi = 3.14
print pi

So i try to excute

pi = 3.14
print len(pi)

But i get object of type 'float' has no len() when expected 4


your variable pi still refers to a float, because you did not assign a new value to it


So we can't measure lenght of float/int? good lesson :wink: thanks!


Would you really want to?

How long is 5?