How to get full screen window?

Hi all,
I am total beginner and trying to create first program. I don’t know how to get full screen window. Till now I tried:

window.attributes('-fullscreen', True)
… doesn’t work

width = root.winfo_screenwidth()
height = root.winfo_screenheight()
root.geometry("%dx%d" % (width, height))

… get not total full screen … some space up and bottom

root.geometry("{}x{}+0+0". format(root.winfo_screenwidth(), root.winfo_screenheight()))
… not total full screen

I wanna full window like you maximize window

Thanks you all for answer

Python tkinter fullscreen gives multiple hits talking about attribute ‘-fullscreen’. Never used it.

Does this help? (We use it in IDLE.)

root.overrideredirect(flag=None)
If called with a True argument, this method sets the override redirect flag, which removes all window manager decorations from the window, so that it cannot be moved, resized, iconified, or closed. If called with a False argument, window manager decorations are restored and the override redirect flag is cleared. If called with no argument, it returns the current state of the override redirect flag.
Be sure to call the .update_idletasks() method (see Section 26, “Universal widget methods”) before setting this flag. If you call it before entering the main loop, your window will be disabled before it ever appears.
This method may not work on some Unix and MacOS platforms.

I don’t know if the last is still true with tk 8.6.

Thanks for andwer … BUT
I am python programmer 3. day :slight_smile: … (switched from c#) so I am not sure if this is right … please correct the code … i dont know how to do it

root = Tk()
root.mainloop()
root.update_idletasks()
root.overrideredirect(flag=None)

P.S. I have MacBook with m2 chip