logo CodeStepByStep logo

set_tracing1

Language/Type: Python collections set

What values are contained in the following set after this code executes?

data = set()
data.add(74)
data.add(12)
data.add(18274)
data.add(9074)
data.add(43)
data.remove(74)
data.remove(43)
data.add(32)
data.add(18212)
data.add(9)
data.add(29999)

(Though sets store their contents in unpredictable order, for this problem, write the values sorted by numeric value of the values, in the format {value, value, value}.)

set contents

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.