root.iconbitmap('icon.ico')
from tkinter import Tk master = Tk() photo = PhotoImage(file = "Any image file") master.iconphoto(False, photo)