About 22,000,000 results
Open links in new tab
  1. 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 …

  2. Create and Import modules in Python - GeeksforGeeks

    Dec 29, 2019 · Creating and Importing a module A module is simply a Python file with a .py extension that can be imported inside another Python program. The name of the Python file …

  3. 6. ModulesPython 3.13.5 documentation

    4 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. Creating Python Modules and Packages Guide - PyTutorial

    May 10, 2025 · Creating Python modules and packages is simple but powerful. It helps organize large projects and share code. Start with small modules and grow into packages as needed.

  6. How To Write Modules in Python 3 - DigitalOcean

    Aug 20, 2021 · Additionally, you can create your own Python modules since modules are comprised of Python .py files. This tutorial will guide you through writing Python modules for …

  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. How to Write a Custom Module in Python | LearnPython.com

    Oct 28, 2021 · In this article, we explore what a Python custom module is, and how to write a module in Python. Let's get right into it. What Is a Custom Module in Python? A module is a …

  9. Chapter 36 - Creating Modules and Packages - Python Library

    How to Create a Python Module¶ We will begin by creating a super simple module. This module will provide us with basic arithmetic and no error handling. Here’s our first example:

  10. Building Custom Python Modules and Packages

    Jan 13, 2025 · Creating a Simple Custom Python Module. Let’s walk through the steps of creating your own Python module. First, create a new directory for your project if you don’t already …

  11. Some results have been removed