Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- words = ['a','list','of','strings']
- def search():
- target = eSearch.get()
- if target in words:
- tList.delete(0.0,tk.END)
- tList.insert(0.0,target)
- top = tk.Tk()
- eSearch = tk.Entry(top)
- eSearch.pack()
- tList = tk.Text()
- tList.insert(0.0, '\n'.join(words))
- tList.pack()
- bSearch = tk.Button(top, text='Search', command=search)
- bSearch.pack()
- top.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement