py::builtins::list::size¶
std::size_t size() const;
Returns the count of elements stored by the list.
Return value¶
The count of elements stored by the list.
Complexity¶
Constant.
Example¶
#include <pypp/builtins/list.hpp>
#include <pypp/builtins/print.hpp>
int main()
{
py::print(py::list<int>({4, 5, 3, 2, 8, 9, 0}).size());
}
Output:
7