from tkinter import *
def setup():
master = Tk()
string_converter_main = StringVar()
entry1 = Entry(master, width = "13", textvariable = string_converter_main, font = ("Helvetica", 23), bg="gray13", fg = "ghostwhite", bd="10")
entry1.grid(row=1, column=0, columnspan=5, sticky=W+E+S+N)
setup()
This is a bit of my code which i am using for my python tkinter calculator. It is to long to put everything but the problem i am facing is you can type a 0 first in the entry and then put a normal number following it. For example i can type 0 then a 5 and it would say 05 in my entry. How can i make this delete the 0 and replace it unless if it is followed by a decimal point or if there is a number in front of it already. Also how to stop multiple zeroes being typed into entry as well.