1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00
Files
quay/util/itertoolrecipes.py
2022-06-16 18:22:16 +02:00

10 lines
216 B
Python

from itertools import islice
# From: https://docs.python.org/2/library/itertools.html
def take(n, iterable):
"""
Return first n items of the iterable as a list.
"""
return list(islice(iterable, n))