ExamVeda
Login
Home
Introduction to Python
?

What is the role of the import statement in Python?

Answer & Solution
Correct Answer: Option C
In Python, the import statement is used to import external modules.
The import statement allows you to access functionality defined in external modules and use it in your Python program. Modules are Python files that contain Python code, including variables, functions, and classes. By importing modules, you can reuse code, organize related functionality, and extend the capabilities of your program. Python provides a rich ecosystem of built-in and third-party modules that cover a wide range of tasks and domains, including math, file I/O, networking, and more. The import statement is essential for leveraging this existing functionality and building powerful Python applications.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.