About 43,500 results
Open links in new tab
  1. python - 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 …

  2. Python Iterators - W3Schools

    An iterator is an object that can be iterated upon, meaning that you can traverse through all the values. Technically, in Python, an iterator is an object which implements the iterator protocol, …

  3. Iterators in Python - GeeksforGeeks

    Dec 16, 2024 · Iterables are objects that can return an iterator. These include built-in data structures like lists, dictionaries, and sets. Essentially, an iterable is anything you can loop …

  4. Iterators and Iterables in Python: Run Efficient Iterations

    Jan 6, 2025 · What Is an Iterator in Python? 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 …

  5. Using Iterations in Python Effectively - GeeksforGeeks

    Mar 6, 2023 · In this article, we will cover How to Iterate Through a Dictionary in Python. To Loop through values in a dictionary you can use built-in methods like values(), items() or even …

  6. 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 …

  7. Python Iterator: Example Code and How it Works

    Jun 24, 2024 · What is a Python iterator? Learn it here, including lots of example code to iterate lists, dictionaries, files, and generators.

  8. Python Iterators - Python Geeks

    Iterators are Python objects that iterate over iterable objects. They follow and implement the iterator protocol. The most important method of an iterator is __next__(). How to create Python …

  9. Python Tutorial: What Does Iteration Mean in Python?

    Oct 25, 2024 · Iteration refers to the process of executing a set of instructions repeatedly until a certain condition is met. In Python, iteration allows you to traverse through data structures like …

  10. Python Iterators - Online Tutorials Library

    Iterator: An object representing a stream of data, returned one element at a time. We normally use for loop to iterate through an iterable as follows −. Python's built-in method iter () implements …

  11. Some results have been removed