Modules vs functions vs methods | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Modules vs functions vs methods

what is the difference between modules and functions and methods things has turnd messy especially I'm a Java learner and my python class turned upside down !

11th Oct 2017, 5:42 PM
Hmmam Babe khuoja
Hmmam Babe khuoja - avatar
2 Answers
+ 1
well google is my best friend on that but sometimes you don't find what do you need
11th Oct 2017, 8:06 PM
Hmmam Babe khuoja
Hmmam Babe khuoja - avatar
+ 1
"method" is a function that is a attached to an object or class. A module is a group of defined functions, classes, consrants, etc. In Python, you create a module by simply putting related stuff in a single file. The module name is the file name. Then you can import that file into your program.
3rd Dec 2017, 6:05 AM
Eric Blinkidu
Eric Blinkidu - avatar