Skip to content Skip to sidebar Skip to footer

What Is Happening With My Types, Typeerror? (python)

I have a method where I retrieve data from an SQLite database. The data is saved as text (for some reason), but really it float numbers (14.5 etc). This is my method to get them: d

Solution 1:

The error message says you wrote if len(speed>0): (Note the >0 inside the len), instead of len(speed)>0, as you should have written it (and as you did in your code snippet).

Solution 2:

Look, you had a typo, the correct way is to do if len(speed)>0:. You've corrected it yourself.

len(5>2) won't work either as 5>2 returns True and True has no len()

Post a Comment for "What Is Happening With My Types, Typeerror? (python)"