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