Python Basics - Data Types Part 4 |

Опубликовано: 29 Август 2026
на канале: AriCodes
22
0

Mapping Data Types:
A mapping data type is a container data structure that stores information in key-value pairs, allowing you to look up a value using a unique identifier called a key.

Keys are unique and immutable but values can be mutable and duplicated

The single standard built-in mapping data type in Python is the dictionary (a collection of key-value pairs), denoted by dict, and initialized using {} i.e. curly braces and : i.e. colon between key-value pairs.
{key:value}

Code:
user = {
"name": "AriCodes",
"age": 3,
"skills": ["Python", "HTML", "CSS"]
}
print(user)
print(user.get("name"))