Home > Backend Development > Python Tutorial > What is value in python

What is value in python

藏色散人
Release: 2019-07-10 13:29:07
Original
45531 people have browsed it

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()
Copy after login

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()
Copy after login

The output result of the above example is:

Value : [7, 'Zara']
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template