Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Set basics
4. Sets from lists
Relationships between sets
Summary

Instruction

Very well done! Note that you can also use set() to create a set with unique elements from a list. Let's see what this looks like:

fav_movie_survey_result = ['Halloween', 'Harry Potter', 'Halloween', 'Halloween', 'The Lion King']

print(set(fav_movie_survey_result))

The code above will print:

{'The Lion King', 'Harry Potter', 'Halloween'}

Exercise

Try an alternative way of creating the new_branch_employees set. Define it using the employees_to_transfer list, which contains some repetitions.

Stuck? Here's a hint!

Start with:

new_branch_employees = set(employees_to_transfer)