py::builtins::list::rbegin¶
reverse_iterator rbegin(); // 1
const_reverse_iterator rbegin() const; // 2
Returns a reverse iterator to the first element of the reversed list.
Returns a constant reverse iterator to the first element of the reversed list.
Tip
(2) is equivalent to py::builtins::list::crbegin.
Return value¶
A reverse iterator to the first element of the reversed list.
A constant reverse iterator to the 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.rbegin());
}
Output:
3