Which of the following statements is used for importing a module in Python?
Correct answer
A. import
14 views
A. import
14 views
The import statement loads a module in Python, e.g. import math. The form from math import sqrt also relies on import; the word from cannot be used alone.
include and require belong to other languages such as PHP, C and Node.js.
Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.