Skip to content
Quiz · Comprehensions · lesson 4 of 8

Quiz — a repeated key

What does the program print?

Python
words = ["apple", "avocado", "banana"]
first = {w[0]: w for w in words}
print(len(first), first["a"])

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way