python – Get icon of root window to be used by second window tkinter


I was wondering if there is anyway to get the ico file of one window and use it in the same window, without getting to know the icon location.

from tkinter import *

root = Tk()
root.iconbitmap('img/icn.ico')
top = Toplevel()

root.mainloop()

Here I want top to have icon of root without saying top.iconbitmap() or top.iconphoto(), the closest ive got is top.tk.call('wm','iconbitmap') but I dont know what is to be done with this as i couldnt find a understandable documentation.

Thanks in advance 😀