From eef0b1097cffe8552f7e19e8472a9b630a9f4a15 Mon Sep 17 00:00:00 2001 From: magardle Date: Wed, 10 May 2017 20:58:00 +0100 Subject: [PATCH] Typo correction Ended an unfinished sentence on line 77 and put brackets for next() in right place on row 186. --- Iterators and Generators.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Iterators and Generators.ipynb b/Iterators and Generators.ipynb index ee23bd2..362d989 100644 --- a/Iterators and Generators.ipynb +++ b/Iterators and Generators.ipynb @@ -74,7 +74,7 @@ "\n", "Generators are best for calculating large sets of results (particularly in calculations that involve loops themselves) in cases where we don’t want to allocate the memory for all of the results at the same time. \n", "\n", - "As we've noted in previous lectures (such as range()) many Standard Library functions that return lists in Python 2 have been modified to return generators in Python 3 because generators.\n", + "As we've noted in previous lectures (such as range()) many Standard Library functions that return lists in Python 2 have been modified to return generators in Python 3.\n", "\n", "Lets create another example generator which calculates [fibonacci](https://en.wikipedia.org/wiki/Fibonacci_number) numbers:" ] @@ -183,7 +183,7 @@ "Notice that if we call some huge value of n (like 100000) the second function will have to keep track of every single result, when in our case we actually only care about the previous result to generate the next one!\n", "\n", "##next() and iter() built-in functions\n", - "A key to fully understanding generators is the next function() and the iter() function.\n", + "A key to fully understanding generators is the next() function and the iter() function.\n", "\n", "The next function allows us to access the next element in a sequence. Lets check it out:" ]