'why i'm getting error when i used my print function print(list(my_iter)) in below code? : **[when im using print(list(my_iter)) in code before printing print(my_iter.__next__()) it is throwing error.bu][1]**


[enter image description here][2]
but if I comment it. it running fine. why it is happening 

  [1]: https://i.stack.imgur.com/kCoVr.png
  [2]: https://i.stack.imgur.com/9a0yQ.pngt 