CompTIA Linux+ (XK0-006) — Question 11
Which of the following allows modules to be used in Python scripts?
Answer options
- A. __init__
- B. import
- C. __name__
- D. det
Correct answer: B
Explanation
The correct answer is B, 'import', which is the keyword used in Python to include modules in your scripts, allowing access to their functions and classes. The other options are not relevant for importing modules: A (__init__) is a constructor method, C (__name__) is used to determine if a script is run as the main program, and D (det) is not a recognized term in this context.