.. index:: py::builtins::range::begin .. _doxycast_pypp_classpy_1_1builtins_1_1range_1a58b65b86fbeeea14819ad1a0946cdea4: .. _py-builtins-range-begin: *py::builtins::range::*\ begin ============================== .. code-block:: cpp constexpr const_iterator begin() const; Returns a constant iterator to the first value of the range. .. warning:: Iterators of ``range`` don't support ``operator ->`` as they are constructed on demand. .. tip:: Equivalent to :ref:`py-builtins-range-cbegin`. .. graphviz:: ../assets/range-begin-end.dot Return value ------------ A constant iterator to the first value. Complexity ---------- Constant. Example ------- .. code-block:: cpp #include #include int main() { py::range range(4); py::print(*range.begin()); } **Output**: .. code-block:: text 0