Computer Science
Which is the correct command to load just the tempc method from a module called usable ?
- import usable, tempc
- import tempc from usable
- from usable import tempc
- import tempc
Python Libraries
2 Likes
Answer
from usable import tempc
Reason — The syntax for importing single method form a module is : from <module> import <objectname>
. According to the syntax, the correct method is from usable import tempc
.
Answered By
3 Likes
Related Questions
Which file must be part of the folder containing Python module files to make it importable Python package ?
- init.py
- __setup__.py
- __init__.py
- setup.py
In Python which is the correct method to load a module math ?
- include math
- import math
- #include
- using math
What is the extension of Python library modules ?
- .mod
- .lib
- .code
- .py
A .py file containing constants/variables, classes, functions etc. related to a particular task and can be used in other programs is called
- module
- library
- classes
- documentation