About sets

4 important questions on About sets

How do you create a set?

A set can be created like a list. Then convert that list to a set with the set() function. All items that are double will be removed.

What function do you use to add an element to a set? And to remove an element?

The .add() function is for adding
the .remove() or .dirscard()   function to remove an element.

What does the funciton .union() do?

Union() gives the mathematical union between sets. So all the duplicates will be removed.
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

How can you check if an set is a subset of another set?

WIth the < operator. It refers to ordening the list like you would order words in a dictionary.

Try our study magic for free

a PDF, study it super fast
  • No sign up, email or credit card needed!
  • AI makes unlimited flashcards
  • Get unlimited quizzes and tests
  • Ask AI anything
Create a notebook
  • No sign up, email or credit card needed!
  • Have and keep perfect overview
  • Make flashcards, notes and mind maps
  • Review, test and score!

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo