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
1
dict
.
items
(
)
Examples
Python 3.13
1
2
a
=
{
'x'
:
1
,
'y'
:
2
}
list
(
a
.
items
(
)
)
[('x', 1), ('y', 2)]