fork download
  1. import itertools
  2. natuals=itertools.count(1)
  3. ns=itertools.takewhile(lambda x:x <=10,natuals)
  4. print(ns)
  5. # your code goes here
Success #stdin #stdout 0.09s 14072KB
stdin
Standard input is empty
stdout
<itertools.takewhile object at 0x147beedbc800>