title: Heapop and Heappush with a regular list (non-heapified list)
body: <p>So I've seen various posts where users get &quot;unusual/unexpected&quot; results when trying to heappop from a regular list. (ex: <a href="https://stackoverflow.com/questions/36876645/unusual-result-from-heappop">Unusual result from heappop?</a>) The solution of course is to heapify it first.</p>
  <p>However, for this <a href="https://leetcode.com/problems/cheapest-flights-within-k-stops/discuss/267200/Python-Dijkstra" rel="nofollow noreferrer">LeetCode solution</a> heapq methods are used on a regular list that isn't heapified prior to using the methods yet still return the correct expected results. Is this because when you use heappop/heappush onto a regular list it just pops/adds the first element in the list?</p>