.. index:: py::builtins::operator <= [py::builtins::range] .. _doxycast_pypp_namespacepy_1_1builtins_1a82154562e7f94b057a99233129b56533: .. _py-builtins-operator-less_than_or_equal-range: *py::builtins::*\ operator <= (:ref:`py::builtins::range `) ============================================================================== *Defined in* ```` .. code-block:: cpp template constexpr bool operator <= (const range& lhs, const range& rhs); Checks whether a range is less than or equal to another range. .. note:: Ranges are compared by the values hold by range, not by specifications of them. Parameters ---------- ``lhs``: A range. ``rhs``: Another range. Return value ------------ Whether ``lhs`` is less than or equal to ``rhs``. Complexity ---------- :math:`O(n)`, where ``n = py::min(lhs.size(), rhs.size())``. Example ------- .. code-block:: cpp #include #include int main() { py::range lhs(9); py::range rhs(10); py::print(lhs <= rhs); } **Output**: .. code-block:: text true