Skip Navigation

Python's "next" function

www.pythonmorsels.com Python's "next" function

Python's built-in next function will consume the next item from a given iterator.

Python's "next" function

I guess I knew the whole "you can't use next on iterables" in the sense that I've never tried it.

I TIL'd about the default value for next.

4

You're viewing a single thread.

4 comments