Tkinter gives us classes to create different widgets, and so is the case with a button. We have a BUtton class in tkk. which gives us the ability to create a button with the help of the Tkinter library.
Below is the code that helps us create a simple button.
from tkinter import Tk from tkinter import ttk root = Tk() button = ttk.Button(root,text="AlixaProDev") button.grid() root.mainloop()
You can learn more about creating button with Tkinter in Python from my blog.