Sets(programming)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/5

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:04 PM on 4/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

6 Terms

1
New cards

How to add an element

Set1.add(set2)

2
New cards

How to make a union

set1.union(set2)

  • returns a union

set1.union_update(set2)

  • updates set 1 to be the union

3
New cards

How to do intersection

set1.intersection(set2)

  • returns the intersection

set1.intersection_update(set2)

  • updates set 1 to the intersection

4
New cards

.pop()

Removes an element from the set

  • unless specified removes last element

figure out how to change specifications

5
New cards

How to find Difference and symmetric

.difference() and .symmetricdifference()

Also an update version

6
New cards

Sets

unordered

Unchangeable

no duplicate