mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 23:23:55 +00:00
Merge pull request #1478 from aayushranaut/master
Range is not a generator
This commit is contained in:
commit
133baf5565
@ -664,8 +664,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