Understanding Python’s “yield” Keyword
The yield keyword in Python is used to create generators. A generator is a type of collection that produces items on-the-fly and can only be iterated once. By using generators you can improve your application’s performance and consume less memory as compared to normal collections, so it provides a nice boost in performance. In this article we’ll explain how to use the yield keyword in Python and what it does exactly. But first, let’s study the difference between a simple […]
Read more