grades = {}
# Add student grades
grades["Emily"] = 88
grades["James"] = 76
grades["Olivia"] = 92
# Print all students and their grades
for student, grade in grades.items():
print(f"{student}: {grade}")
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