Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Create list of unique values from dictionary

dict = {'511':'Vishnu','512':'Vishnu','513':'Ram','514':'Ram','515':'sita'}
list =[] # create empty list
for val in dict.values(): 
  if val in list: 
    continue 
  else:
    list.append(val)

print list
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Create #list #unique #values #dictionary
ADD COMMENT
Topic
Name
2+5 =