Lecture 5 Flashcards

1
Q

Sets

A

Are unordered collections of unique elements defined using curly brackets.

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

What happens with duplicates in a set?

A

Duplicate element in asset will not result in an error, but they will not be stored

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

Can you change sets after the created?

A

No sets cannot be changed, but they can be added or removed

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

Dictionaries

A

Dictionaries are ordered collections of key value pairs defined using curly brackets. Keys must be unique, but values can be duplicated. He can be strings numbers or temples. Values are changeable and can be any data type.

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

How are values in dictionary accessed

A

With square brackets and they associated key.

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