fork download
  1. # your code goes here
  2. n = 1234
  3. print(map(int, str(n)))
  4. print(type(map(int, str(n))))
  5. # map is a generator which yeilds an object when we call next()
  6. # or iterate using loop
Success #stdin #stdout 0.02s 9236KB
stdin
Standard input is empty
stdout
<map object at 0x2b5c9caece80>
<class 'map'>