Last updated 1 year ago by Gaurav Balyanpython
In this article, I pick a asynchronous programming concept from python which is launched in python 3.4. It provides infrastructure for writing single-threading concurrent code using coroutines and it is totally based on event loop.
Coroutine :- This is a sequence of instruction or a simply function which is used for specific task but difference between simple function and coroutine is that coroutine can pause and resume that’s why coroutine can be used for non-primitive multi-tasking.
In python, Coroutine like generator but difference between coroutine and generator is that generator produce data but coroutine consume data.