MCQ Answer

Which operator is used in Python to import modules from packages?

Which operator is used in Python to import modules from packages?

पैकेज से मॉड्यूल आयात करने के लिए पायथन में किस ऑपरेटर का उपयोग किया जाता है?
Topic : Modules in Python

A. .

B. *

C. ->

D. &




Correct Answer is :

A. .



Explanation

In Python, the import statement is used to import modules from packages. The dot (.) operator is used to reference modules within a package. Here's a basic explanation:


Let's say you have a package named mypackage with a module named mymodule. You can import mymodule in your Python script or another module using the import statement:

Example:


import mypackage.mymodule


If you want to import all items from a module or package, you can use the * wildcard:
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz