The 'discard( )' Function is used to remove a particular value from the Set.
x = {"Mohan", "Kriti", "Salim"} x.discard("Kriti") print(x)
So, in the above code we have created a 'Set' and initialised to the variable 'x'.
Next, we have used the 'discard( )' Function that searches for the name 'Kriti' and removes it from the Set.
And we get the below output,