import tkinter as tk
root = tk.Tk()
# Textausgabe erzeugen
label1 = tk.Label(root, text="Hallo Welt")
label1.pack()
schaltf1 = tk.Button(root, text="Aktion durchführen")
schaltf1.pack()
root.mainloop()
go_button = tk.Button(master=window, text='Submit')
go_button.pack()
from tkinter import * # Importing gui module
def button_function(): # The function that the button will run
print("Text")
screen = Tk() # Creating a screen
button_quit = Button(screen, text="Quit", command=lambda:quit) # Creating a button
button_quit.pack() # Putting the button on the screen
button2 = Button(screen, text="BUTTON TEXT", command=lambda:button_function()) # Creating another button
button2.pack() # Putting that button on the screen
screen.mainloop # Opening the screen
from tkinter import *
top = Tk()
top.geometry("200x100")
b = Button(top,text = "Simple")
b.pack()
top.mainaloop()