You’ve learned a lot about Python iterators and iterables. Now you know what they are and what their main differences are. You learned how to create different types of iterators according to their specific behavior regarding input and output data.
You studied generator iterators and learned how to create them in Python. Additionally, you learned how to build your own iterables using different techniques. Finally, you touched on asynchronous iterators and asynchronous loops in Python.
In this video course, you learned how to:
- Create your own iterators using the iterator protocol in Python
- Differentiate iterators from iterables and use them in your code
- Use generator functions and the
yield
statement to create generator iterators - Build custom iterables using different techniques, such as the iterable protocol
- Write asynchronous iterators using the
asyncio
module and theawait
andasync
keywords
With all this knowledge, you’re now ready to leverage the power of iterators and iterables in your code. In particular, you’re able to decide when to use an iterator instead of iterable and vice versa.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.