0
Python tk() error
i tired python Gui. Since I'm on Python 3.7.4, tkinter must be already installed. and I wrote my first Code. """ from tkinter import * window = tk() label = label(window, text = 'hello world!').pack() window.mainloop() """ but I'm getting this error """ NameError: name 'tk' is not defined """ Please help how to resolve...
1 Answer
+ 1
window = Tk()
The name of the class is Tk, not tk. Also the label class, it's supposed to be Label.