AI for Professionals

AI for Professionals

Python Essentials

Async (async / await)

AI for Professionals's avatar
AI for Professionals
Feb 16, 2026
∙ Paid

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.

User's avatar

Continue reading this post for free, courtesy of AI for Professionals.

Or purchase a paid subscription.
© 2026 Srilakshmi Chiluvuri · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture