What Are Python Coroutines?
This lesson and the subsequent ones introduce Python coroutines and the benefits of running things asynchronously. You’ll learn what they are and how they compare to generators.
In this video, you’ll also see how to create a synchronous function that prints out a random number after a few seconds.
def randn(): time.sleep(3) return randint(1, 10)
Comments & Discussion
Become a Member to join the conversation.