About 59,000 results
Open links in new tab
  1. Python Iterators - W3Schools

    Technically, in Python, an iterator is an object which implements the iterator protocol, which consist of the methods __iter__() and __next__(). Lists, tuples, dictionaries, and sets are all …

  2. Iterators in Python - GeeksforGeeks

    Dec 16, 2024 · An iterator in Python is an object that holds a sequence of values and provide sequential traversal through a collection of items such as lists, tuples and dictionaries. . The …

  3. What are iterator, iterable, and iteration? - Stack Overflow

    Mar 27, 2012 · In Python, iterable and iterator have specific meanings. An iterable is an object that has an __iter__ method which returns an iterator, or which defines a __getitem__ method …

  4. Python Iterator: Example Code and How it Works

    Jun 24, 2024 · To understand what a Python iterator is, you need to know two terms: iterator and iterable: An object that can be iterated, meaning we can keep asking it for a new element until …

  5. Iterators and Iterables in Python: Run Efficient Iterations

    Jan 6, 2025 · In Python, an iterator is an object that allows you to iterate over collections of data, such as lists, tuples, dictionaries, and sets. Python iterators implement the iterator design …

  6. Iteration in Python: A Comprehensive Guide - CodeRivers

    Jan 26, 2025 · In Python, iteration is a powerful and flexible feature that enables you to work with sequences (such as lists, tuples, strings) and other iterable objects efficiently. Understanding …

  7. Understanding Iteration in Python - CodeRivers

    Mar 22, 2025 · Iteration in Python refers to the process of repeating a block of code a certain number of times or until a specific condition is met. Python has two main types of iteration …

  8. iteration | Python Glossary – Real Python

    In Python, iteration refers to the process of executing a block of code repeatedly. This is typically done with loops such as for and while. When you iterate over a data collection, you go through …

  9. Python Iterators (With Examples) - Programiz

    Iterators are methods that iterate collections like lists, tuples, etc. Using an iterator method, we can loop through an object and return its elements. Technically, a Python iterator object must …

  10. Iterators in Python (With Examples) - wscubetech.com

    Feb 26, 2025 · In simple terms, iterators in Python means looping through iterable objects. We use the iter () method to initialize a Python iterator object and the next () method for iteration. …

  11. Some results have been removed
Refresh