Python tip 31: next() function

Published: 24 July 2023
on channel: learnbyexample
109
2

You can use the `next()` builtin function to retrieve the next item of iterators. Once you have exhausted an iterator, trying to get another item will result in a `StopIteration` exception, which you can override to provide a default value instead.


This video is based on content from my "100 Page Python Intro" ebook: https://github.com/learnbyexample/100...


On this page of the site you can watch the video online Python tip 31: next() function with a duration of hours minute second in good quality, which was uploaded by the user learnbyexample 24 July 2023, share the link with friends and acquaintances, this video has already been watched 109 times on youtube and it was liked by 2 viewers. Enjoy your viewing!