99.2k views
5 votes
Given that s refers to a set, write a statement that attempts to remove integer 11 from the set, but will do nothing if 11 is not in the set.

User Radix
by
4.1k points

1 Answer

4 votes

Answer:

Here is the code:-

#(5) Given that s refers to a set, write a statement that attempts

#to remove the int value 11 from the set, but will do nothing if 11 is

#not in the set

#check if 11 is in not in s

if 11 is not in s:

pass

else:

#other wise remove 11 from s

s.remove(11)

Step-by-step explanation:

Given that s refers to a set, write a statement that attempts to remove integer 11 from-example-1
User Umbo
by
3.4k points