Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get unique values from a list

mylist = ['nowplaying', 'PBS', 'PBS', 'nowplaying', 'job', 'debate', 'thenandnow']
myset = set(mylist)
print(myset)
mynewlist = list(myset)
#['nowplaying', 'PBS', 'job', 'debate', 'thenandnow']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unique #values #list
ADD COMMENT
Topic
Name
2+2 =