summaryrefslogtreecommitdiff
path: root/progs/unparsable_programs/a948.py
blob: f42212f501d23936b88661ae7a80ea3d00b258dc (plain)
1
2
3
4
import heapq
def expensive_items(items,n):
  expensive_items = heapq.nlargest(n, items, key=lambda s: s['price'])
  return expensive_items