Reading Set Data Exercise
Question 1 of 6
What is the most efficient way to check if multiple items exist in a set?
users = {"alice", "bob", "carol", "david"}
to_check = ["alice", "eve", "bob"]
# Which approach is best for checking membership?Sort the set first, then use binary search
Use a loop with try-except to find items
Convert set to list first, then check membership
Use 'in' operator for each item: all(user in users for user in to_check)