Home > Article > Backend Development > What is value in python
Python Dictionary (Dictionary) values() function returns all the values in the dictionary as a list.
values() method syntax:
dict.values()
Parameters
NA.
Return value
Returns all values in the dictionary.
The following example shows how to use the values() function:
#!/usr/bin/python dict = {'Name': 'Zara', 'Age': 7} print "Value : %s" % dict.values()
The output result of the above example is:
Value : [7, 'Zara']
Related recommendations: "PythonTutorial》
The above is the detailed content of What is value in python. For more information, please follow other related articles on the PHP Chinese website!