I'm making a unit converter, and so far it's working. I put in a number and get my answer, but it keeps all of my previous answers so they start to overlap. Is there a way to delete old answers instead of just stacking them on top of each other?example of what's going on
This is what I have and where I think the problem is
def convert():
x1 = entry1.get()
x2 = variable1.get()
x3 = variable2.get()
if x2 == 'in':
if x3 == 'in':
result = float(x1)
if x3 == 'ft':
result = float(x1)*0.0833333
label1 = tkinter.Label(win, text=result, font='Pixeltype 30', bg='black', fg='gray')
canvas1.create_window(300, 330, window=label1)
button1 = tkinter.Button(text='Convert', command=convert, font='Pixeltype 15', bg='black', fg='gray')
canvas1.create_window(300, 280, window=button1)
win.mainloop()