Skip to content

Commit 9ac544f

Browse files
authored
Update readme.md
Fixed typos in readme.md
1 parent c2062dd commit 9ac544f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Iterators and Generators/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Iterators and Generators <a href="https://colab.research.google.com/github/Ahmad-Zaki/Python-Notes/blob/main/Iterators%20and%20Generators/iterators-and-generators.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab" title="Open and Execute in Google Colaboratory"></a>
22

3-
Iterators are objects that have you can loop\iterate upon, which means that we can go over all the values that it contains.
3+
Iterators are objects that you can loop\iterate upon, which means that we can go over all the values that it contains.
44

5-
In Python, An iterable object is an object that implements `__iter__`, which is expected to return an iterator object. An iterator object implements `__next__`, which is expected to return the next element of the iterable object that returned it, and to raise a StopIteration exception when no more elements are available.
5+
In Python, An iterable object is an object that implements `__iter__`, which is expected to return an iterator object. An iterator object implements `__next__`, which is expected to return the next element of the iterable object that it's created from, and to raise a StopIteration exception when no more elements are available.
66

7-
Python generators are a simple way of creating iterators. Generator functions allow you to declare a function that behaves like an iterator, i.e. it can be used in a for loop. A generator is, simply put, a function which can stop whatever it is doing at an arbitrary point in its body, return a value back to the caller, and, later on, resume from the point it had `frozen' and merrily proceed as if nothing had happened.
7+
Python generators are a simple way of creating iterators. Generator functions allow you to declare a function that behaves like an iterator, i.e. it can be used in a for loop. A generator is, simply put, a function which can stop whatever it is doing at an arbitrary point in its body, return a value back to the caller, and, later on, resume from the point it had `frozen' and merrily proceed as if nothing had happened.

0 commit comments

Comments
 (0)