Python yield paradigm
Python yield paradigm Table of Contents generator or iterator generator pipe coroutine concurrency The yield keyword in python language is its landmark and invention, it is not just a language syntactic and feature, it lets python programming rocks in the functional programming way. Here in this article, I try to collect all the yield magic here to surprise the python newbie. 1 generator & iterator "yield" is the keyword that to make a generator in python, so what the generator is? Before that, I just try to explain what the Iterator is first? An iterator is an easier and more common concept in objective oriented languages, take java, for example, basically, every container can be converted to an iterator. List < String> namesList = new ArrayList < String> (); // add 3 names namesList.add( "moses" ); namesList.add( "jacobs" ); namesList.add( "davide" ); // iterate via Iterator Iterator < Str...