Skip to content
dreamcode
dreamcode
Back to lesson
Practice · Py-dict-comprehensions
PredictArrangeFill in
+20 XP on finish
PREDICT · READ BEFORE YOU WRITE

What is printed by this code?

Read the program like the computer would, then call the output before you run anything.

stars = {"sirius": 8, "vega": 5, "rigel": 6}
bright = {k: v for k, v in stars.items() if v > 5}
print(bright)