Element at¶
See also
- Official ReactiveX documentation: ElementAt
-
Observable.
element_at
(index)¶ Returns the element at a specified index in a sequence.
Example: res = source.element_at(5)
Keyword arguments: :param int index: The zero-based index of the element to retrieve.
Returns: An observable sequence that produces the element at the specified position in the source sequence. :rtype: Observable
-
Observable.
element_at_or_default
(index, default_value=None)¶ Returns the element at a specified index in a sequence or a default value if the index is out of range.
Example: res = source.element_at_or_default(5) res = source.element_at_or_default(5, 0)
Keyword arguments: index – {Number} The zero-based index of the element to retrieve. default_value – [Optional] The default value if the index is outside
the bounds of the source sequence.- Returns an observable {Observable} sequence that produces the element at
- the specified position in the source sequence, or a default value if the index is outside the bounds of the source sequence.