I have a file named "intro_to_tkinter.py" and in this file I have imported a function "print something()" from another file named "demos_tkinter.py". Whenever I execute the "intro_to_tkinter.py" file "demos_tkinter.py"is executed.
this is the "demos_tkinter.py" file
from tkinter import *
def print_something():
print("hello")
roots=Tk()
roots.mainloop()
this is "intro_to_tkinter.py" file
from tkinter import *
from demos_tkinter import print_something
root=Tk()
root.configure(bg="#000000")
print_something()
root.mainloop()
what should i do to execute only the desired function and not the file