Skip to content
Quiz · Dicts and sets · lesson 8 of 11

Quiz — set operations

What does the program print?

Python
a = {1, 2, 3}
b = {2, 3, 4}
print(len(a | b), len(a & b), sorted(a - b))

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