Python Essentials
Async (async / await)
1️⃣ What is async?
Normally, Python executes code line by line (synchronously).
Example:
import time
def task1():
time.sleep(2)
print("Task 1 done")
def task2():
time.sleep(2)
print("Task 2 done")
task1()
task2()
Output takes 4 seconds because each function blocks the next one.


