File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ which calculates fibonacci numbers:
8383 # generator version
8484 def fibon (n ):
8585 a = b = 1
86- for i in xrange (n):
86+ for i in range (n):
8787 yield a
8888 a, b = b, a + b
8989
@@ -102,7 +102,7 @@ However, if we would have implemented it like this:
102102 def fibon (n ):
103103 a = b = 1
104104 result = []
105- for i in xrange (n):
105+ for i in range (n):
106106 result.append(a)
107107 a, b = b, a + b
108108 return result
@@ -164,5 +164,5 @@ iterable. Here is how we can use it:
164164 Now that is much better. I am sure that you loved learning about
165165generators. Do bear it in mind that you can fully grasp this concept
166166only when you use it. Make sure that you follow this pattern and use
167- ``generators `` whenever they make sense to you. You wont be
167+ ``generators `` whenever they make sense to you. You won't be
168168disappointed!
You can’t perform that action at this time.
0 commit comments