Imports
Import Entire module
- Importing in python is process of loading code from a python module into the current script
- This allows you to use the functions and variables defined in the module in your current script also any additional modules that the imported module might depend upon
- For example to import the math module
Import specific function
for multiple functions use commaimport using as keywork
Use Modules or class from multiple file
person.py
class Person:
Name=""
Age=""
def PrintData(self):
print(f"Name:{self.Name}")
print(f"Age:{self.Age}")
Import Modules from sub folder
sub folder file : Util/Calculator.py
main file