I have been attempting to define a python function in one script (lets call it script1.py) like so:
def fn1():
print("Hello")
and then to import it into a separate python file in the same directory (lets call it script2.py) like this:
from script1 import fn1
or import script1
I've found lots of posts/answers supporting this process, but I continue to receive the error message that there is "No module named 'script1'". Most of the posts I've seen are from 3+ years ago, so perhaps the newer versions of python have terminated this option.
I appreciate any solutions!