About 399,000 results
Open links in new tab
  1. __init__ in Python - GeeksforGeeks

    Sep 12, 2025 · When an object is created, memory is allocated for it, and __init__ helps organize that memory by assigning values to attributes. Let’s look at some examples.

  2. Python __init__ () Method - W3Schools

    All classes have a built-in method called __init__(), which is always executed when the class is being initiated. The __init__() method is used to assign values to object properties, or to …

  3. Understand __init__ Method in Python

    Oct 7, 2025 · The __init__ method (pronounced “dunder init” – short for double underscore init) is a special method in Python classes that gets called automatically when you create a new …

  4. Python __init__ () - Working and Examples

    __init__() is a built-in function in Python that is called whenever an object is created. It initializes the state for the object, meaning it's where we can set the attributes of an object.

  5. Python __init__ () Function: Syntax, Usage, and Examples

    The Python __init__() function serves as the constructor method for classes. It initializes newly created objects and allows you to assign values to object properties or run startup procedures …

  6. Understanding the `__init__` Function in Python - CodeRivers

    Apr 23, 2025 · The __init__ function in Python is a powerful and essential part of object-oriented programming. It allows you to initialize the state of objects, set up default values, and perform …

  7. Python __init__ Method - Complete Guide - ZetCode

    Apr 8, 2025 · The __init__ method is a special method in Python classes that initializes newly created objects. It's called automatically after the object is created by __new__.

  8. “What is __init__ in Python? Explained with Examples”

    Sep 2, 2024 · When you create an object (or instance) from a class, Python automatically calls the __init__ method to ensure that the object is initialized with the appropriate attributes. In …

  9. Python __init__

    When you create a new object of a class, Python automatically calls the __init__() method to initialize the object’s attributes. Unlike regular methods, the __init__() method has two …

  10. 9. Classes — Python 3.14.2 documentation

    1 day ago · 9. Classes ¶ Classes provide a means of bundling data and functionality together. Creating a new class creates a new type of object, allowing new instances of that type to be …