fork(1) download
  1. import heapq
  2.  
  3. lista = [100,3,2,17,19,36,1,25,7]
  4.  
  5. heapq.heapify(lista)
  6. print(lista)
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
[1, 3, 2, 7, 19, 36, 100, 25, 17]