Tkinter entry as float? | Sololearn: Learn to code for FREE!


Tkinter entry as float?

Hi, im making basic GUI with Python on my Rpi, but i have problem. I need my tkinter entry field to output as float, its allways string. Thanks in advance :)

6/5/2019 8:53:22 PM

Gramatický Komunista

4 Answers

New Answer


The float() function converts strings and integers into floats. Here are a couple examples: It should do what you need


Can you provide the string you’re using? As long as it’s a number, and not text, it shouldn’t be an issue


Thanks, for sure i tried this, but output allways throw error "Cant convert string to float"...


I got it now, thanks much for your help :)