How can detect that a user entering characters in tkinter entry ? I want to calculate the total cost from 2 different entry. here is my code but does not work!
from tkinter import *
root=Tk()
def calculate_total_cost(event):
if count_ent.get().isdigit() and unit_cost_ent.get().isdigit():
total_cost=int(count_ent.get())*int(unit_cost_ent.get())
print(total_cost)
count_ent=Entry(root).pack()
unit_cost_ent=Entry(root).pack()
unit_cost_ent.bind("<key>",calculate_total_cost)