The following code imports the tkinter module, creates a root widget, and uses the Label() function to create a text-label widget. The widget is given a 30-pixel wide and 10-pixel high border, and is then packed into a tk.Tk object. This object is then used as the mainloop() object in a Python program.
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
ttk.Label(root, text="Hello, World!", padding=(30, 10)).pack()
root.mainloop()