Knowing that a function named fun() resides in a module named mod, choose the correct way to import it.
- import fun from mod
- from fun import mod
- from mod import fun
- import fun
Explanation: Remember that to import specific functions from a module, the keyword from followed by the module’s name is used. Afterward, specify function names after the import keyword, separated by commas.
More Questions: Python Essentials 2 – Module 1 Test
Please login or Register to submit your answer