logo CodeStepByStep logo

remove_range

Language/Type: Python collections

Write a function named remove_range that accepts three parameters: a set of integers, a minimum value, and a maximum value. The function should remove any values from the set that are between that minimum and maximum value, inclusive. For example, if a set named s contains {3, 17, -1, 4, 9, 2, 14}, the call of remove_range(s, 1, 10) should modify s to store {17, -1, 14}.

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.