Skip to main content

first

Return the first item in a list.

def first(
value: sequence
) - > any

Return the first item in a list.

Parameters

NameTypeDescription
valuesequenceThe list or sequence from which to retrieve the first item.

Returns

TypeDescription
anyThe first element of the sequence if it exists, otherwise an empty string.