Dictionaries is a data structure in python,it is different way to reprsent a record as an object that is more generally known as an associative array. dictionary consists of a collection of key-value pairs. Each key-value pair maps the key to its value.
In this example “name” is a key and “john” is value and contact is again a key and [“8800383838″,”9989767870″,”6534568345”] is a value that is a python list.
student={
“name”:”Jhon”,
“age”:22,
“email”:”jhon@gmail.com”,
“contact”:[“8800383838″,”9989767870″,”6534568345”]
}
print(type(student))
print(student)
student[“email”]=”jhon1987@gmail.com”
print(student)
y=student[“contact”]
print(type(y))