←
Sets
‹
Example 3 of 5
›
Reset
Run code
Python · edit the code
Ctrl
+
Enter
runs it
Code
skills = {"Python", "Excel"} skills.add("SQL") skills.add("Python") # already there, nothing changes skills.update(["Git", "HTML"]) print(sorted(skills)) skills.discard("Excel") skills.discard("Java") # not there, no error print(sorted(skills))
Output · Python 3.14 in your browser