make a heap : heapify « Buildin Function « Python Tutorial






heap = [5, 8, 0, 3, 6, 7, 9, 1, 4, 2]

heapify(heap)

print heap








13.20.heapify
13.20.1.make a heap