# Create a dictionary - paired values
student_grades = {
"Alice": 90,
"Bob": 85,
"Charlie": 92
}
# Access and modify
print(student_grades["Alice"])
student_grades["Bob"] = 88 # Update Bob's grade
# Add a new entry
student_grades["Dave"] = 95
print(student_grades)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter