do something when button is clicked tkinter code example
Example: add a button on tkinter
import tkinter
button1 = ttk.Button(self, text="anything", command=random command)
button1.pack()
import tkinter
button1 = ttk.Button(self, text="anything", command=random command)
button1.pack()