Introduction
Modules help keep your code organized by grouping related things together. They also prevent name clashes when different parts of your program use the same names.
When you want to group related methods or constants together.
When you want to avoid conflicts between method or class names in large programs.
When you want to create a clear structure for your code, like folders for files.
When you want to share methods across different classes without inheritance.
When you want to create a namespace to separate similar names.