label options in tkinter code example
Example 1: python tkinter label
from Tkinter import *
root = Tk()
w = Label(root, text="Hello Tkinter!")
w.pack()
root.mainloop()
Example 2: python tkinter getting labels
from tkinter import *
root = Tk()
l = Label(root, text='Hello World!!')
l.pack()
Example 3: how to create a label in tkinter
from tkinter import *
new_window = Tk()
new_window.title("My Python Project")
new_window.geometry("300x250")
Label(new_window, text = "Hello World").pack()
Example 4: tkinter label
from Tkinter import *
root = Tk()
var = StringVar()
label = Label( root, textvariable=var, relief=RAISED )
var.set("Hey!? How are you doing?")
label.pack()
root.mainloop()