This works for me with Python3 on Linux:
import tkinter as tk
# Create Tk window
root = tk.Tk()
# Add icon from GIF file where my GIF is called 'icon.gif' and
# is in the same directory as this .py file
root.tk.call('wm', 'iconphoto', root._w, tk.PhotoImage(file='icon.gif'))