py::builtins::list::crbegin

const_reverse_iterator crbegin() const;

Returns a constant reverse iterator to first element of the reversed list.

digraph begin_end { node [ shape = Mrecord, height = 0, width = 0, fontname = "Courier New", fontsize = 10 ]; array [ label = < <TABLE BGCOLOR="lightgrey" BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="12"> <TR> <TD PORT="rend" STYLE="dotted" SIDES="TLB"></TD> <TD PORT="begin"></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD></TD> <TD PORT="rbegin"></TD> <TD PORT="end" STYLE="dotted" SIDES="TRB"></TD> </TR> </TABLE> >, shape = plaintext ] begin [label="begin"] end [label="end"] rbegin [label="rbegin"] rend [label="rend"] begin -> array:begin end -> array:end rbegin -> array:rbegin rend -> array:rend rank3 [style=invisible]; array -> rank3 [color=none] { rank = same; rank3; begin; end; } }

Return value

A constant reverse iterator to first element of the reversed list.

Complexity

Constant.

Example

#include <pypp/builtins/list.hpp>
#include <pypp/builtins/print.hpp>

int main()
{
    py::list<int> list = {0, 0, 1, 3};
    py::print(*list.crbegin());
}

Output:

3