Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Append Set to Set

Consider the sets a={1} and b={2}. As output I want {1,{2}}. I tried

sage: a={1};b={2}
sage: a.add(b)

and

sage: a.union({b})

but both attempts result in an error:

TypeError: unhashable type: 'set'