The items of the list L are lists themselves. Being mutable,
lists are not hashable, and therefore cannot be used as elements
in a set, so we turn them into tuples first.
sage: n = 3
sage: H = Set(range(1, n+1))
sage: H
{1, 2, 3}
sage: L = Combinations(H, 2).list()
sage: L
[[1, 2], [1, 3], [2, 3]]
sage: M = set(tuple(c) for c in L)
sage: M
{(1, 2), (1, 3), (2, 3)}
sage: SetPartitions(M)
Set partitions of {(1, 2), (1, 3), (2, 3)}
sage: P = SetPartitions(M)
sage: P
Set partitions of {(1, 2), (1, 3), (2, 3)}
sage: for p in P:
....: print p
....:
{{(1, 2), (1, 3), (2, 3)}}
{{(1, 2)}, {(1, 3), (2, 3)}}
{{(1, 2), (2, 3)}, {(1, 3)}}
{{(1, 2), (1, 3)}, {(2, 3)}}
{{(1, 2)}, {(1, 3)}, {(2, 3)}}