Psst! Check what courses we have in our offer, and get them all here to save \$727. Tick-tock—this deal ends on 3/21.
Introduction
Set basics
Relationships between sets
Summary

Instruction

Perfect! Removing elements from sets is also very easy. There are several ways to do it. Let's start with the discard() method:

favorite_movies = {'Halloween', 'A Star Is Born', 'Hocus Pocus'}

The discard() method deletes a given element from a set. If the element we're trying to delete is not present in the set, Python simply ignores the method invocation and does nothing.
new_branch_employees.discard('Nancy Silva')