Range is not a generator

This commit is contained in:
Aayush Ranaut 2015-10-09 18:48:40 -04:00
parent 087bc761d5
commit 7d8bab656f

View File

@ -661,8 +661,6 @@ def double_numbers(iterable):
# Instead of generating and returning all values at once it creates one in each
# iteration. This means values bigger than 15 wont be processed in
# double_numbers.
# Note range is a generator too. Creating a list 1-900000000 would take lot of
# time to be made
# We use a trailing underscore in variable names when we want to use a name that
# would normally collide with a python keyword
range_ = range(1, 900000000)