Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
items
items
Returns a new list of the dictionary's items as (key, value) tuples.
Python 3.13
dict
.
items
(
)
Examples
Python 3.13
>>
>
a
=
{
'x'
:
1
,
'y'
:
2
}
>>
>
list
(
a
.
items
(
)
)
[
(
'x'
,
1
)
,
(
'y'
,
2
)
]