Hello everyone, how are you? Today we're gonna learn about Import. When you are creating a big project you can't code everything you need. So the Python Community made modules to make the work easy, import, Python Problems, programming, java, software, PHP, C programming, programming languages, visual, Pascal, Perl, XML program, UNIX, cyber program, C++, HTML, CSS, Python syntax, software, what is computer, programming, programming languages, computer programming, what is coding, what is programming, contract programming, need a programmer, cyber program, tmbmnadim, Alpha Codist, python, Alpha Codist, blogger, Python problems to solve, pythopn free corse, get python corse for free, Learn Python for free
Hello everyone, how are you? Today we're gonna learn about Import. When you are creating a big project you can't code everything you need. So the Python Community made modules to make the work easy.
You can call module by module-name.Class-name.function-name.
A module is a Python object with arbitrarily named attributes that you can bind and reference. Simply, a module is a file consisting of Python code. A module can define functions, classes, and variables. A module can also include runnable code.
You can call module by module-name.Class-name.function-name.
Example:
Here math is the module name and pow() is the function.
import math # importing the math module
a = 5
p = 3
b = math.pow(a, p) # a is the number and p is power
print(b)
COMMENTS