Does python have a native iterable of the infinite integer series?
I've tried range(float('inf'))
and iter(int)
, but neither work.
I can obviously implement my own generator along the lines of
def int_series(next=1):
while True:
next += 1
yield next
but this feels like something which should already exist.