Why doesn't 'import *' give me all modules?

36 Views Asked by At

I am relatively new to Python but I am a little bit confused about the import statement.

When I type from tkinter import *, I do not have tkinter.ttk, so I also have to type from tkinter import ttk.

Does the * not import all modules? When I type print(dir(tkinter)) I can see ttk so why is it not imported?

I expected to import all modules with *.

0

There are 0 best solutions below