print all unique values in a 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

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
get all unique dict values unique get all dict values map all unique values to their keys python get all unique values from a dictionary using value python compute unique values python using dictionary function to print all the unique values in an array in python python program to print all unique values in a dictionary python print distinct values print unique values in dictionary python write a python program to print all unique values in a dictionary Write a Python program to print all unique values in a dictionary. Write a program to print all the unique values in the dictionary. To print all unique values in a dictionary. python dict only unique values get all unique values python unique values in a dictinary how to add set of unique values in dictionary python print only unique values in dictionary python how to get distinct data of keys and values in dictionary python return unique elements in list python to dictionary only keep unique values in dict python how to make a dictionary with some distinct keys and values Print all unique values in a dictionary. how to get distinct dict property values in python get unique values from list of dictionary python get unique values from dictionary in python unique values from a dictionary in python get all values from dictionary unicue python how to get values in dictionary python unique find unique values in dictionary python get unique values from dictionary python python unique values in dictionary python use dictionary to find unique values python create dictionary from list with unique elements distinct dictionary by value pyhton get unique values dictionary python how to get only unique items from list dictionary python only unieq numers in dictnary python unique value in dict python unique value sin dict get all unique value for dict key python get dictionary of unique values python dictionary get unique values python dictionary unique values find all unique items in dictionary value python get list of unique values of a dictionary python defining unique values in python dictionary how to find unique elements in list of dictionary python how to find unique values in a list of dictionary python how to store unique values in python dict how to make set of unique elements from dict in python get unique element from a dictionary python get unique value from 2 dict keys in python
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source