Which out of the following is incorrect syntax for importing a module of Python?
2026
Which out of the following is incorrect syntax for importing a module of Python?
- A.
import math
- B.
from math import sin, cos
- C.
from sin, cos import math
- D.
import math as mt
Attempted by 164 students.
Show answer & explanation
Correct answer: C
Python import syntax requires the module name after 'from' and specific items after 'import'. The option 'from sin, cos import math' is invalid because it reverses this order. Correct syntax is 'from math import sin, cos'. Other options follow standard Python conventions.