Home  >  Article  >  Backend Development  >  What is value in python

What is value in python

藏色散人
藏色散人Original
2019-06-25 09:13:4345501browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to install python3Next article:How to install python3