0

I have a script I'm writing, and I start like this:

from tkinter import *
import tkinter.messagebox as mbx
import tkinter.filedialog as fd
root = Tk()

Should I use

import tkinter as tk`
x = tk.Text(root)

or use

from tkinter import *
x = Text(root)

as I always used to do?

someone
  • 1
  • 2
  • 3
    Take a look at [Why is "import *" bad?](https://stackoverflow.com/q/2386714/9470078). It is probably better style to `import tkinter as tk`, but it definitely depends on many things. – Monolith Sep 10 '22 at 14:25

0 Answers0