micropython-lib/heapq/test_heapq.py

9 wiersze
122 B
Python

import heapq
h = []
heapq.heappush(h, (10.1, 0))
heapq.heappush(h, (1.1, 1))
print(h)
assert h == [(1.1, 1), (10.1, 0)]