How to make label and entry start blank
<p>Any idea on how to make all the entry and labels in my GUI start blank but then update when the calculate function happens? They currently start with a 0. I have tried many things but nothing has worked. </p>

<p>Here is code: </p>

<pre><code>from tkinter import *

root = Tk(className="Page Calculator")
root.title("PgCalc")
read = IntVar()
total = IntVar()
left = IntVar()
percent = IntVar()

def calculate(event=None):
    try:
        left.set(total.get() - read.get())
        percent.set(int(read.get()*100/total.get()))
    except ZeroDivisionError:
        print("ZeroDivisionError")
    else:
        print()

root.bind('&lt;Return&gt;', calculate)

read_label = Label(root,text="Pages Read:")
read_label.grid(column=1, row=1)

read_entry = Entry(root, width=8, textvariable=read)
read_entry.grid(column=2, row=1)
read_entry.focus()

total_label = Label(root,text="Total Pages:")
total_label.grid(column=1, row=2)

total_entry = Entry(root, width=8, textvariable=total)
total_entry.grid(column=2, row=2)


calculate_button = Button(root,text="Calculate",command= calculate)
calculate_button.grid(column=2, row=3)

percent_label = Label(root,text="Percent Finished:")
percent_label.grid(column=1, row=4)

left_label = Label(root,text="Pages Left:")
left_label.grid(column=1, row=5)

percentresult_label = Label(root,textvariable=percent)
percentresult_label.grid(column=2, row=4)

leftresult_label = Label(root,textvariable=left)
leftresult_label.grid(column=2, row=5)

root.mainloop()
</code></pre>

<p><code>IntVar()</code> has a default value of 0.  Even though they are IntVar, you can <code>set</code> strings as their value (note that when you try to <code>get</code> its value, you'll get an error if they still contain strings).  </p>

<p>So you can simply do</p>

<pre><code>read = IntVar()
read.set("")
</code></pre>

<p>But, since you are using Entry, you don't need any IntVar at all. You can directly get entry's value and cast it to an integer.</p>

<pre><code>def calculate(event=None):
    try:
        leftresult_label.config(text=str(int(total_entry.get()) - int(read_entry.get())))
    except ValueError:
        print("Please enter a number")

#You need to remove textvariables from entries as well like below
total_entry = Entry(root, width=8)
</code></pre>

python tkinter label entry