Data Types - Set Flashcards
1
Q
Which of the following can’t be sliced, and why not;
Set
Tuple
A
Set
Because, they are;
1) Not ordered
2) Not Indexable
2
Q
What is the syntax for a set
A
{1, 2, 3}
3
Q
What’s the most likely reason to specifically use a Set
A
To convert another data type to a Set to eliminate duplicates