anext()

Built-in FunctionPython 3.10+Expert

Retrieves the next item from an async iterator

Quick Info

Documentation
Official Docs
Python Version
3.10+

Learn by Difficulty

Quick Example

python
# anext() gets next item from async iterator
print("anext() is the async version of next()")
print("Usage: value = await anext(async_iterator)")

anext() is a built-in function that retrieves the next item from an async iterator.

Try in Playground

Tags

builtinfunctioncoreasynciteration

Related Items