4 ms·
Only if you iterate over a fixed-length iterable. [x for x in itertools.count()] will never terminate.
by joshuamorton 9y ago
Only if you iterate over a fixed-length iterable.
[x for x in itertools.count()]
will never terminate.
- heavenlyblue 8y agoIt will terminate as soon as it runs out of memory.
- joshuamorton 8y agoBy this definition, python has a nice locally defined property that it will always terminate ;)
- heavenlyblue 8y agoNo; this will never-ever terminate: (x for x in itertools.count())