#region Notes
"""
Mutable
ordered Sequence
Heterogenous items
Key-Value pair
Accessed by Key
Key should be Unique
"""
#endregion
data={
1: "one",
'2': [2, "Two"],
3 : {
3.1 : True,
3.2 : (1,2,3)
}
}
#region crud
data[2]=2
print(data)
print(data.get(2,"NA"))
data[2]="Two"
print(data.get(2,"NA"))
data.pop(1)
data.popitem()
print(data)
#endregion
for key, value in data.items():
if key == 3:
print("Nested dictionary")
else:
print(f"{key} = {value}")
{print("Nested dictionary") if key == 3 else print(f"{key} = {value}") for key, value in data.items()}
On this page of the site you can watch the video online Python Tutorial: Dictionary in Python with a duration of hours minute second in good quality, which was uploaded by the user GeeksByte 27 August 2021, share the link with friends and acquaintances, this video has already been watched 113 times on youtube and it was liked by 5 viewers. Enjoy your viewing!