Yes, you can make this assumption, because it is stated in the documentation:

Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that heap[0] is always its smallest element.

(And that's probably the reason there is no peek function: there is no need for it.)

Answer from Stephan202 on Stack Overflow
🌐
Python
docs.python.org › 3 › library › heapq.html
heapq — Heap queue algorithm
Source code: Lib/heapq.py This module provides an implementation of the heap queue algorithm, also known as the priority queue algorithm. Min-heaps are binary trees for which every parent node has ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › heap-queue-or-heapq-in-python
Heap queue or heapq in Python - GeeksforGeeks
Note: The heapq module allows in-place heap operations on lists, making it an efficient and simple way to implement priority queues and similar structures.
Published   April 6, 2026
🌐
APXML
apxml.com › courses › data-structures-algorithms-ml › chapter-5-heaps-priority-queues-ml › python-heapq
Python heapq Module for Heap Operations
Since heapq uses a list where the first element heap[0] is always the smallest, you can peek at the minimum value without removing it simply by accessing the element at index 0.
🌐
Medium
medium.com › the-pythonworld › why-hardly-anyone-uses-pythons-heapq-but-should-0a6933bed8b1
Why Hardly Anyone Uses Python’s heapq (But Should) | by Aashish Kumar | The Pythonworld | Medium
October 30, 2025 - Python coders adore their sets, lists, and dictionaries. But just ask them about heapq — Python’s built-in heap (priority queue) implementation — and chances are you’ll get puzzled stares.
Find elsewhere
🌐
Interviewcrunch
interviewcrunch.com › python › advanced-data-structures › heap
Heap | InterviewCrunch: Coding Interviews Broken Down
Since the heap is a list, you can look at index 0 of the list to peek at the smallest value in the heap: ... If you want to create a max heap (a heap that will return the maximum value), use a negative priority. ... If tuples are stored in the heap, heapq will attempt to arrange the items based ...
🌐
Code Like A Girl
code.likeagirl.io › python-min-heap-priority-queue-interview-prep-66f127db1176
Python Min Heap — Priority Queue-Interview Prep | by Python Code Nemesis | Code Like A Girl
November 14, 2023 - The heapq module in Python provides an implementation of a binary heap, a data structure that satisfies the heap property.
🌐
Stack Abuse
stackabuse.com › guide-to-heaps-in-python
Guide to Heaps in Python
April 18, 2024 - Explore the intricacies of heaps, a tree-based data structure adept at maintaining order and hierarchy. Dive into Python's' heapq module, offering a rich set of functionalities for managing dynamic data sets where priority elements are frequently accessed. Learn how heaps stand out in the world ...
🌐
Medium
medium.com › the-pythonworld › why-hardly-anyone-uses-pythons-heapq-but-should-9e11052e409b
Why Hardly Anyone Uses Python’s heapq (But Should) | by mata | The Pythonworld | Medium
October 5, 2025 - Python coders adore their sets, lists, and dictionaries. But just ask them about heapq — Python’s built-in heap (priority queue) implementation — and chances are you’ll get puzzled stares.
🌐
Johnlekberg
johnlekberg.com › blog › 2020-11-01-stdlib-heapq.html
Python's heapq module
This week's Python blog post is about Python's heapq module.
🌐
Stackify
stackify.com › a-guide-to-python-priority-queue
A Guide to Python Priority Queue - Stackify
February 18, 2025 - While built-in options like PriorityQueue and heapq work well for many cases, sometimes you need more flexibility. For example, you might want to extend functionality, customize the priority logic, or add extra features like a peek method. A custom heapq implementation allows you to tailor ...
🌐
Medium
medium.com › @hs_pedro › implementing-a-heap-in-python-1036e759e0eb
Implementing a Heap in Python. Heap is an elegant data structure that… | by Pedro Soares | Medium
December 20, 2021 - For instance, one can heapify an ... and implementation of the following methods: peek (or find-minimum): returns the smallest key stored in constant time...
🌐
Delft Stack
delftstack.com › home › howto › python › python heapq peek
How to Peek Heapq in Python | Delft Stack
February 2, 2024 - The following code snippet shows how we can use the heapq.heappop() function to peek at the smallest element inside a heap in Python.
🌐
Medium
dpythoncodenemesis.medium.com › understanding-pythons-heapq-module-a-guide-to-heap-queues-cfded4e7dfca
Understanding Python’s Heapq Module: A Guide to Heap Queues | by Python Code Nemesis | Medium
October 21, 2023 - Heapq is a module in Python that provides an implementation of the heap queue algorithm, also known as the priority queue algorithm.
🌐
GeeksforGeeks
geeksforgeeks.org › python › heap-and-priority-queue-using-heapq-module-in-python
Heap and Priority Queue using heapq module in Python - GeeksforGeeks
July 23, 2025 - The priority queue is implemented in Python as a list of tuples where the tuple contains the priority as the first element and the value as the next element. ... Consider a simple priority queue implementation for scheduling the presentations ...
🌐
DEV Community
dev.to › devasservice › understanding-pythons-heapq-module-1n37
Understanding Python's heapq Module - DEV Community
September 19, 2024 - In Python, heaps are a powerful ... smallest (or largest) item. The heapq module in Python provides an implementation of the heap queue algorithm, also known as the priority queue algorithm....