variables - How to prevent a number from being rounded down Python Tkinter -


I am working on a program that receives the user index status when they are typing in a text widget in the tanker And it preserves it as a convertible. But whenever the index is 1.20 then it revolves around 1.2. Is there any way to ensure that the variable 1.20 in index 1.20 will be left?

I have tried to use float ().

Any thoughts?

And thank you in advance.

The solution is simple: never consider the index as a number, because it is not a number This is a string that looks like a number if you have a code that is rounding the value (or leaving indexed zeros), somewhere you are treating it as a number


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -