+ 1

Can we create our own modules ? if yes , then how?

17th Jul 2016, 1:18 PM
Ashish Nambiar
Ashish Nambiar - avatar
4 Answers
+ 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
17th Jul 2016, 4:24 PM
sundar
sundar - avatar
+ 1
Any python script can be a module. Just import the name of the script.
17th Jul 2016, 4:19 PM
Gershon Fosu
Gershon Fosu - avatar
- 2
you can only create them if you know how to ... and to do this you should learn whole python first..
24th Jul 2016, 5:56 PM
Aakash Sharma
Aakash Sharma - avatar
- 4
s
17th Jul 2016, 1:29 PM
ĂněĂȘsh ĶohlĂŻ MĆŻthyālĂŠ
ĂněĂȘsh ĶohlĂŻ MĆŻthyālĂŠ - avatar