Search notes:

Python: iterator

An iterator might be created by a generator, or functions like map, filter or iter and functions that use the yield statement..

Relation to iterables

An iterator is an object with an __iter__ and a __next__ method.
The presence of the __iter__ method makes the iterator also an an iterable. However, an iterable is not necessarily an iterator.

See also

Example: create an arbitrary number of fibonacci numbers
The built in function iter and The built in function next.
The itertools standard library.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758198429, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/iterable/iterator/index(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78