can understand why we made iterators and iterables different’
Iterators and iterable
Hello Akshay, we need to create the iterators and iterables separately as because if we implement it once if the starting i reaches at the end once it won’t print the things next time. But if you have seen at the end of this video we are using the zrange again and again and we can implement diff funcs on them like square or cube or whatever you want to it will always start it the original list but in case of yrange in which we implemented both the things at once we can use it at once.
I hope it is clear to you. Incase still there is any doubt you can ask me, I will surely help you out.
Incase it is clear please mark it as resolve and provide the feedback so that we can improve ourselves.
Thanks
Happy Coding !!
Please ask in case it is not clear to you. I will help you out.
Thanks
list does not have inbuilt iter function so how does iter(list) help it
List , string and tuples are iterables on their own
so why dont they have inbuilt iter function when i type dir(list)
there is __iter__ when we type this dir(list)
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.