Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 426 Bytes

hello-world.md

File metadata and controls

22 lines (18 loc) · 426 Bytes
title description author tags
Hello, World!
Creates a basic Tkinter window with a "Hello, World!" label.
Legopitstop
app,hello-world,object-oriented
from tkinter import Tk, Label

class App(Tk):
    def __init__(self):
        Tk.__init__(self)
        self.geometry("200x200")

        self.lbl = Label(self, text='Hello, World!')
        self.lbl.pack(expand=1)

# Usage:
root = App()
root.mainloop()