About 5,070 results
Open links in new tab
  1. Create and Import modules in Python - GeeksforGeeks

    Dec 29, 2019 · In Python, modules allow us to organize code into reusable files, making it easy to import and use functions, classes, and variables from other scripts. Importing a module in …

  2. How to write a Python module/package? - Stack Overflow

    Apr 1, 2013 · A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py. Create a file called hello.py with the following function as its …

  3. 6. ModulesPython 3.13.3 documentation

    3 days ago · A module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended. Within a module, the module’s name (as a string) …

  4. Python Modules - W3Schools

    Create a Module. To create a module just save the code you want in a file with the file extension .py:

  5. Python Modules - GeeksforGeeks

    Aug 9, 2024 · Create a Python Module. To create a Python module, write the desired code and save that in a file with.py extension. Let's understand it better with an example: Example: Let's …

  6. How To Write Modules in Python 3 - DigitalOcean

    Aug 20, 2021 · This tutorial will guide you through writing Python modules for you or others to use within your program files.

  7. Creating Your First Module in Python: A Step-by-Step Guide

    Oct 5, 2024 · Creating and using modules in Python is a straightforward yet powerful way to organize and reuse code. By following the steps outlined in this guide, you can effectively …

  8. Creating Python Modules and Packages Guide - PyTutorial

    May 10, 2025 · Learn how to create importable Python modules and packages. Step-by-step guide for beginners with examples and best practices.

  9. Python Modules: Creating, Importing, and Sharing - Stack Abuse

    Nov 28, 2017 · In this article we start from the core basics of module creation and importing, to more advanced module usage cases, to packaging and submitting your modules to an …

  10. Creating Modules in Python: A Comprehensive Guide

    Apr 10, 2025 · In this blog post, we'll explore how to create modules in Python, their usage methods, common practices, and best practices. A Python module is simply a Python file …

  11. Some results have been removed
Refresh