Python has this library heapq, which we can use to perform heap operations. What does "q" stand for?
It literally means what it sounds like: heap queue. The doco confirms this:
8.4. heapq — Heap queue algorithm
heapq