1import tkinter as tk
2from tkinter import ttk
3
4win = tk.Tk()
5
6v = tk.StringVar()
7def setText(word):
8 v.set(word)
9
10a = ttk.Button(win, text="plant", command=setText("plant"))
11a.pack()
12b = ttk.Button(win, text="animal", command=setText("animal"))
13b.pack()
14c = ttk.Entry(win, textvariable=v)
15c.pack()
16win.mainloop()
17