+ 2

Guys I am confuse about import in python plz tell me what the work of import tag

11th Dec 2020, 9:41 AM
Tanishk Sharma
Tanishk Sharma - avatar
3 Respuestas
+ 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
11th Dec 2020, 9:47 AM
noteve
noteve - avatar
+ 3
Thnx bro i read and know about import tag
11th Dec 2020, 9:48 AM
Tanishk Sharma
Tanishk Sharma - avatar
+ 2
its not a tag its a keyword its used to import packages and modules
11th Dec 2020, 9:48 AM
Aɭoŋɘ ɭovɘʀ