Which means very simply that the condition is failing:
remove1
is not in
set1
. Why not? Because
input
always returns a string, an d you are comparing a string with an integer.
Either convert all your inputs to integers:
remove1 = int(input("\n Enter the element you want to remove :"))
if remove1 in set1:
...
Or none of them:
for n in range(num):
numbers = input("Enter number ")
set1.add(numbers)
print("elements in given list is :", set1)
remove1 = input("\n Enter the element you want to remove :")
if remove1 in set1:
...