Python

Python Menu

Python

Python Dictionary values() - Definition, Syntax, Parameters, Examples

Definition

The values() method returns a view object. The view object contains the values of the dictionary, as a list.

The view object will reflect any changes done to the dictionary.

Syntax

dictionary.values()

Parameters

No Parameters.

Examples:

person = { "name": "Raymond", "age": 29, "country": "Japan" } j = person.values() print(j)
# example when a value is updated person = { "name": "Raymond", "age": 29, "country": "Japan" } k = person.values() person["age"] = 18 print(k)

Introduction

Python Basics

Python Advance

Data Science Python Tutorials

Python Functions and Methods