19. Threading Basics
Threads allow concurrent execution of tasks within a single process.
Example
import threading
def worker():
print("Worker running")
t = threading.Thread(target=worker)
t.start()
t.join()
Wrap-Up
Threading is useful for I/O-bound tasks, but limited by the Global Interpreter Lock (GIL).