.. index:: py::builtins::operator <= [py::builtins::list] .. _doxycast_pypp_namespacepy_1_1builtins_1a5c95b7e94fcdfb9118d35fba2b132b02: .. _py-builtins-operator-less_than_or_equal-list: *py::builtins::*\ operator <= (:ref:`py::builtins::list `) ============================================================================ *Defined in* ```` .. code-block:: cpp template bool operator <= (const list& lhs, const list& rhs); Checks whether a list is less than or equal to another list. Parameters ---------- ``lhs``: A list. ``rhs``: Another list. 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::list lhs{0, 9, 1, 3}; py::list rhs{0, 9, 1, 3}; py::print(lhs <= rhs); } **Output**: .. code-block:: text true