# converting a set into a list?

how to convert a set into a list in sage?

converting a set into a list?

how to convert a set into a list in sage?

3

```
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?

1

Asked: **
2014-02-02 07:29:49 -0500
**

Seen: **1,021 times**

Last updated: **Feb 02 '14**

Converting Octave vector to Sage list

Is there a command to find the place of an element in an array?

How to get a list of the combinations such that the elements are equal to some $n$

frequency (count) in Numpy Array

Sage showed "TypeError: need a summation variable" when i used sum function with for loop

LaTeX Output: How to replace Brackets and add Dollars

converting a list to a text without copy-pasting

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

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!