1sample_set = frozenset({10, 20, 30, 40})
2my_list = list(sample_set)
3print(my_list)
4
1public void givenUsingCoreJava_whenSetConvertedToList_thenCorrect() {
2 Set<Integer> sourceSet = Sets.newHashSet(0, 1, 2, 3, 4, 5);
3 List<Integer> targetList = new ArrayList<>(sourceSet);
4}
1my_set = set([1,2,3,4])
2my_list = list(my_set)
3print my_list
4>> [1, 2, 3, 4]
1sample_set = {10, 20, 30, 40}
2l = []
3for i in sample_set:
4 l.append(i)
5print(l)
6