About 138,000,000 results
Open links in new tab
  1. Python next () 函数 - 菜鸟教程

    Python next () 函数 Python 内置函数 描述 next () 返回迭代器的下一个项目。 next () 函数要和生成迭代器的 iter () 函数一起使用。

  2. Python教程57:Python内置函数next简介 - 知乎专栏

    在Python中, next() 是一个内置函数,用于从迭代器中获取下一个元素。 本教程将深入探讨 next() 函数的用法、参数、示例以及一些高级应用。

  3. Python next () method - GeeksforGeeks

    Dec 19, 2025 · Python's next () function returns the next item of an iterator. Example Let us see a few examples to see how the next () method in Python works.

  4. next () | Python’s Built-in Functions – Real Python

    If the iterator has remaining items, next() returns the next item from the iterator. If the iterator is exhausted and a default is provided, next() returns the default value.

  5. Python next () Function - W3Schools

    Definition and Usage The next() function returns the next item in an iterator. You can add a default return value, to return if the iterator has reached to its end.

  6. 浅谈 Python 中的 next () 函数 —— 迭代器的驱动引擎_python next

    本文深入解析了 Python 中的 next () 函数,包括其基本语法、典型用法和底层原理。 next () 用于从迭代器中获取下一个元素,耗尽时会抛出 StopIteration 异常,可通过默认值参数避免。

  7. Python `.next()` 方法深入解析 - geek-blogs.com

    Sep 21, 2025 · 尽管在 Python 3 中 .next() 被 __next__() 方法所取代,但了解 .next() 的工作原理有助于我们更好地理解 Python 迭代机制的演变。 本文将详细介绍 .next() 的基础概念、使用方法、常见实 …

  8. Python next 用法详解及示例 - 极客教程

    Python中的 next 函数可以用于获取可迭代对象的下一个元素。 它可以结合 iter 函数一起使用,通过创建一个迭代器来遍历可迭代对象。

  9. pythonnext方法详解 - 简书

    Feb 7, 2025 · next 是 Python 中的一个内置函数,专门用来从 迭代器(iterator) 中获取下一个元素。 简单来说, next 就像是一个“迭代器的遥控器”,可以让你从迭代器中“拿”出下一个值。

  10. Python 中的 next () - 内置函数及示例 - 《Dive into Python》中文版

    next() 函数是一个内置的 Python 函数,它通过调用迭代器的 __next__() 方法来检索迭代器的下一个项目。 如果迭代器已用尽,它将引发 StopIteration 异常。