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.
Pythondef randn():
time.sleep(3)
return randint(1, 10)
Copied!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4