colour.utilities.first_item#
- colour.utilities.first_item(a: Iterable) Any[source]#
Return the first item from the specified iterable.
- Parameters:
a (Iterable) – Iterable to retrieve the first item from.
- Returns:
First item from the iterable.
- Return type:
- Raises:
StopIteration – If the iterable is empty.
Examples
>>> a = range(10) >>> first_item(a) 0