The method values() returns a list of all the values available in a given dictionary.
Following is the syntax for values() method:
dict.values()
NA
This method returns a list of all the values available in a given dictionary.
The following example shows the usage of values() method.
#!/usr/bin/python dict = {'Name': 'Zara', 'Age': 7} print "Value : %s" % dict.values()
When we run above program, it produces following result:
Value : [7, 'Zara']