- To import an individual function or class from a module:
from module_name import object_name
- To import multiple individual objects from a module:
from module_name import first_object, second_object
- To rename a module:
import module_name as new_name
- To import an object from a module and rename it:
from module_name import object_name as new_name
- To import every object from a module
import module_name
No comments:
Post a Comment