Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

creating a set from a list

numbers = [1, 2, 6, 3, 1, 1, 6]
unique_nums = set(numbers)
print(unique_nums)
>>>{1, 2, 3, 6}
Source by classroom.udacity.com #
 
PREVIOUS NEXT
Tagged: #creating #set #list
ADD COMMENT
Topic
Name
9+5 =