If one of my python files is called hello.py
, is there a way to import it to my other python file, called main.py
, in the following way:
main.py
name = "hello"
import name
I get the following error:
ModuleNotFoundError: No module named 'name'