Sets Flashcards

1
Q

A collection of unique elements, what is this?

A

A set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you create a set?

A

{1,2,3}

Curly brackets w/ no colon just elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Will a set return repeated elements?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How would you add an element to this set?

a = {1,2,3,4}

A

a.add()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly