How to center a window on the screen in Tkinter?

PHOTO EMBED

Wed Dec 29 2021 15:25:20 GMT+0000 (Coordinated Universal Time)

Saved by @kartick_sriram #python

#Import the tkinter library
from tkinter import *

#Create an instance of tkinter frame
win = Tk()

#Set the geometry
win.geometry("600x250")

win.eval('tk::PlaceWindow . center')

win.mainloop()
content_copyCOPY

python centering

https://www.tutorialspoint.com/how-to-center-a-window-on-the-screen-in-tkinter