first
Return the first element in it that predicate accepts.
If ``predicate`` is None it will return the first item that's not
:const:`None`.
def first(
predicate: callable | None = null,
it: iterable = null
) - > Any | None
Return the first element in it that predicate accepts. If predicate is None it will return the first item that's not :const:None.
Parameters
| Name | Type | Description |
|---|---|---|
| predicate | `callable | None` = null |
| it | iterable = null | The collection of elements or promises to be evaluated and searched. |
Returns
| Type | Description |
|---|---|
| `Any | None` |