Python dictionary technique values() revisits a catalog of entire the values accessible in a provided dictionary. values() is an inherent method in Python encoding language that arrivals a listing of all the values accessible in an agreed dictionary. Returns: returns a roll of all the values existing in a given dictionary. The values have been amassed in a reversed manner.
Following is the syntax for values() method:
dict.values()
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 the above program, it produces the following result:
Value : [7, 'Zara']
Here at Intellinuts, we have created a complete Python tutorial for Beginners to get started in Python.