Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Extraction of Information | Dictionary
course content

Conteúdo do Curso

Python Data Structures

Extraction of InformationExtraction of Information

Let's build a dictionary called student.

This dictionary includes three key-value pairs:

KeyValue
'first name''Ann'
'last name''Elliot'
'city''New York'

In the dictionary, you can retrieve an item using its key. Here's an example.

In the code provided, Python searches for the value associated with the 'city' key in the student dictionary and assigns this value to the city_of_student variable.

Time to get hands-on!

Tarefa

You're working with the following dictionary:

Display the values for the keys Turkey and Malta.

Tudo estava claro?

Seção 2. Capítulo 3
toggle bottom row
course content

Conteúdo do Curso

Python Data Structures

Extraction of InformationExtraction of Information

Let's build a dictionary called student.

This dictionary includes three key-value pairs:

KeyValue
'first name''Ann'
'last name''Elliot'
'city''New York'

In the dictionary, you can retrieve an item using its key. Here's an example.

In the code provided, Python searches for the value associated with the 'city' key in the student dictionary and assigns this value to the city_of_student variable.

Time to get hands-on!

Tarefa

You're working with the following dictionary:

Display the values for the keys Turkey and Malta.

Tudo estava claro?

Seção 2. Capítulo 3
toggle bottom row
some-alt