Lecture 5 Flashcards
1
Q
Sets
A
Are unordered collections of unique elements defined using curly brackets.
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
3
Q
Can you change sets after the created?
A
No sets cannot be changed, but they can be added or removed
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.
5
Q
How are values in dictionary accessed
A
With square brackets and they associated key.