introduce the contents of _ _ init__.py under the current directory into the script article.py to report an error ImportError: cannot import name "fake"
test/
__init__.py
article.py
file _ _ init__.py
-sharp -*- coding:utf-8 -*-
def fake():
print("A")
File article.py
-sharp -*- coding:utf-8 -*-
from . import fake
print(fake)
execute python article.py
error prompt:
Traceback (most recent call last):
File "article.py", line 2, in <module>
from . import fake
ImportError: cannot import name "fake"
how to introduce the contents of _ _ init__.py in article.py