In Python, a generator is an iterator constructor: a function that returns an iterator. An example of a Python generator returning an iterator for the Fibonacci numbers using Python's codice_1 statement follows:  def fibonacci(limit):  for number in fibonacci(100): # The generator constructs an iterator Some object-oriented languages such as C#, C++ (later versions), Delphi (later versions), Go, Java (later versions), Lua, Perl, Python, Ruby provide an intrinsic way of iterating through the elements of a container object without the introduction of an explicit iterator object. An actual iterator object may exist in reality, but if it does it is not exposed within the source code of the language. Implicit iterators are often manifested by a "foreach" statement (or equivalent), such as in the following Python example: for value in iterable:  In Python, an iterable is an object which can be converted to an iterator, which is then iterated through during the for loop; this is done implicitly. Or other times they may be created by the collection object itself, as in this Ruby example: iterable.each do |value| end This iteration style is sometimes called "internal iteration" because its code fully executes within the context of the iterable object (that controls all aspects of iteration), and the programmer only provides the operation to execute at each step (using an anonymous function). Languages that support list comprehensions or similar constructs may also make use of implicit iterators during the construction of the result list, as in Python: names = [person.name for person in roster if person.male] Sometimes the implicit hidden nature is only partial. The C++ language has a few function templates for implicit iteration, such as codice_2. These functions still require explicit iterator objects as their initial input, but the subsequent iteration does not expose an iterator object to the user. Iterators are a useful abstraction of input streams – they provide a potentially infinite iterable (but not necessarily indexable) object. Several languages, such as Perl and Python, implement streams as iterators. Alternative implementations of stream include data-driven languages, such as AWK and sed. In procedural languages it is common to use the subscript operator and a loop counter to loop through all the elements in a sequence such as an array. Although indexing may also be used with some object-oriented containers, the use of iterators may have some advantages:   The ability of a container to be modified while iterating through its elements has become necessary in modern object-oriented programming, where the interrelationships between objects and the effects of operations may not be obvious.