Didn't get the exact feel of iterator working

Can you please explain me how exactly are functions called and which functions are called sequentially and how numbers are generated and a list is formed when we write y=range(5)?

I understood how numbers are generated using next() function and all but was not able to predict the exact working of the above?

Hey @nikhil_sarda, the mentor has covered the topic really well, i would strongly recommend watching the video, again, It is not possible to make it understandable in messages.

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :blush: