Computer Science

Which file must be a part of a folder to be used as a Python package ?

  1. package.py
  2. __init__.py
  3. __package__.py
  4. __module__.py

Python Libraries

1 Like

Answer

__init__.py

Reason — For a folder containing Python files to be recognized as a package, an __init__.py file (even if empty) must be part of the folder.

Answered By

1 Like


Related Questions