Answer the question
In order to leave comments, you need to log in
Why doesn't import work in Python?
The question is banal, but I stalled at this point.
There is a main file, and there is a module that contains one function. They are in the same folder. In the main file there is a function call from the module.
It works if from test_function import abc, but it doesn't work if import test_function (I want all subsequent code from the module to be automatically imported into the main file in the future). Am I doing something wrong?
Answer the question
In order to leave comments, you need to log in
How do you call?
If I remember correctly - in the second case, you need to call through the module - test_function.abc()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question