Question: How does Python's garbage collection mechanism work?
Answer: Python uses reference counting and a cyclic garbage collector to manage memory. Reference counting deallocates objects with zero references. The cyclic garbage collector handles objects involved in reference cycles, preventing memory leaks.