from tkinter import *
root = Tk()
photo = PhotoImage(file = "image.png")
root.iconphoto(False, photo)
'''To change the icon you should use iconbitmap or wn_iconbitmap
I'm under the impression that the file you wish to change it to must be an ico file.'''
import tkinter as tk
root = tk.Tk()
root.iconbitmap("myIcon.ico")