Python dictionary (Dictionary) values () method
description
Python dictionary (Dictionary) values () function to return a list of all the values in the dictionary.
grammar
values () method syntax:
dict.values()
parameter
- NA.
return value
Returns all values in the dictionary.
Examples
The following example shows the values () method using the function:
#!/usr/bin/python dict = {'Name': 'Zara', 'Age': 7} print "Value : %s" % dict.values()
The above example output is:
Value : [7, 'Zara']