First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to list weak compositions?

I would like to know if there's a way to list weak compositions in SageMath Similar to: list(Compositions(2, length=2)) The result is: [[1, 1]] I would like to have: [[1, 1],[2, 0],[0, 2]]