+ 1
Can we create our own modules ? if yes , then how?
4 Respostas
+ 5
Its so simple. you need to create your functions in a python file and save it. then import the file as module
example:
#This is my module file addmodule.py
def add(x, y):
z=x+y
print(z)
#This is my program
import addmodule
add(5,6)
Now u may have a idea on how to create and import a module
+ 1
Any python script can be a module. Just import the name of the script.
- 2
you can only create them if you know how to ...
and to do this you should learn whole python first..
- 4
s