mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 10:01:38 +00:00
Range is not a generator
This commit is contained in:
parent
087bc761d5
commit
7d8bab656f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user