mirror of
https://github.com/quay/quay.git
synced 2026-01-26 06:21:37 +03:00
10 lines
216 B
Python
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))
|