I have a function:
def f():
print('hi')
saved in a file example.py.
I start the prompt on windows and hit python
and type the following commands:
from importlib import reload
import example
from example import *
And then I change something in the file example.py and hit reload(example). But it only works when I call example.f(). Do I always have to add an extra from example import * to be able to call just f() after reloading? Is there a better way to achieve that?