How to do relative imports in python?
Answer / Shweta Srivastava
To perform relative imports in Python, you can use dot notation with either the `from` or `import` statements. Make sure that the package structure and import path match.nnHere's an example:nn``pythonn# parent/__init__.pynn# child1.pynfrom .child2 import Child2Classnn# child2.pynclass Child2Class:n passn``
| Is This Answer Correct ? | 0 Yes | 0 No |
Name few python web application frameworks?
What is cgi in python?
What are the benefits of python?
What is blob in python?
Is django an ide?
Is python a programming?
How do you use n in python?
Can you use bootstrap with python?
Which module(s) of python can be used to measure the performance of your application code?
What are the different file-processing modes with python?
Explain in detail – inheritance in python?
What is a docstring?