+ 2
Guys I am confuse about import in python plz tell me what the work of import tag
3 Respostas
+ 3
It allows you to gain access to functions of another modules and libraries
Example for math, instead of creating new function for square root of a number
(e.g. def sqrt(n):
return n ** (0.5)
Note: this is not the actual function in the math module, I just used it as example.
You can just do this:
import math
print(math.sqrt(n))
https://docs.python.org/3/reference/import.html
+ 3
Thnx bro i read and know about import tag
+ 2
its not a tag its a keyword its used to import packages and modules