How do you create a package so that the following reference will work?
p = mytools.myparser.MyParser()
Select one:
a.
Declare the myparser package in mytools.py
b.
Create an __init__.py in the home dir
c.
Create a myparser.py directory inside the mytools directory
d.
This can not be done
e.
Inside the mytools dir create __init__.py
Answers
Answer:
option (d) This can not be done
please mark me in brainliest please
Answer:
An ordered group of Python modules is known as a Python package. Just one Python file makes up a Python module.
Explanation:
Why would I want to create a package using __init__.py?
Making it simpler to construct bigger Python projects is the main goal of __init .py package creation.
It gives you a way to combine various Python scripts into a single importable module.
Let's look at a few instances.
Run through a few brief examples to better comprehend the benefits of using __init .py and to discover how to do so to build a package. Doing is the most effective method to learn.
Python 2 or 3 should be compatible with the code in this tutorial. You must use the from __future__ import print function functionality if you are using version 2, but keep that in mind.
Consider that we have developed three modules:
someFolder | — stringLength | — stringToUpper
'— stringToLower.py
Keep in mind that any single Python file also goes by the moniker "module."
To Learn more About Python package Refer To:
https://brainly.in/question/9037568
https://brainly.in/question/22123051
#SPJ2