Dictionaries
Store information using key-value pairs.
Learn by experimenting
Study the Python code, run it, change values and observe the output. Practical experimentation is an important part of learning programming.
Python Code
Python runs directly in your browser.
student = {
'name': 'Alex',
'age': 18,
'grade': 'Grade 10'
}
print(student['name'])
print(student['grade'])
Python Output
Program output appears here.
Test your understanding
Choose the best answer.
Which Python structure stores key-value pairs?