import tkinter as tk

# トップレベルウインドウの生成
root = tk.Tk()
# トップレベルウインドウの設定
root.title('pack関数')
root.geometry('250x120')

# Labelウィジェットの生成
label_1 = tk.Label(
  root,
  text='画面の中央')

# Labelウィジェットをウインドウの中央に配置
label_1.pack(expand=True)

# メインループに入る
root.mainloop()
