Quick Start
References
Contributing
License
Appendix
void clear();
Clears the list.
Linear in the size of the list.
#include <pypp/builtins/list.hpp> #include <pypp/builtins/print.hpp> int main() { py::list<int> list = {0, 1}; py::print(list); list.clear(); py::print(list); }
Output:
{0, 1} {}