converting a set into a list?
how to convert a set into a list in sage?
how to convert a set into a list in sage?
S = set([1,1,2,2,2,3,4,5])
L = list(S)
print L;
type(S); type(L)
@ndomes But it keeps only one 1 in the list.But i want to write set([1,1,2,2,2,3,4,5]) in partition form.That means i want output to be the list [5,4,3,2,2,2,1,1].Could you please tell me how to do it?
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2014-02-02 14:29:49 +0100
Seen: 1,910 times
Last updated: Feb 02 '14
I would have thought the current answer works, so please edit your post to a very explicit example. By the nature of sets, their is only one of each element! Or do you mean multisets, or just want partitions? Thanks!