EasyOutput prediction

Dict comprehension

What does this code print?

words = ['hi', 'hello', 'hey']
lengths = {w: len(w) for w in words}
print(lengths)

← → arrow keys to navigate

Sign in to save your progress.