Can __init__.py be empty?

0234

Yes, the __init__.py file can be empty. An empty __init__.py file is still valid and serves the purpose of indicating to Python that the directory should be treated as a package. However, you can also include initialization code or import statements in it if needed.

0 Comments

no data
Be the first to share your comment!