Which of the following will result in {1,2,3}?
list("123")
tuple("123")
set("123")
None of the above
Which of the following can create an empty set?
set()
{}
[]
()
For two sets s1 and s2, s1 < s2 means_______.
The size of s1 is smaller than that of s2
The elements of s1 are smaller than those of s2
s1 is a proper subset of s2
s2 is a proper subset of s1
Which of the following operations does not exist for a set s?
len(s)
s.append(1)
max(s)
s - {1}
For the operation a[2]=3, the type of a cannot be ______.
Set
List
Tuple
Dictionary
Elements of a set can be of any data type.
The result of len(set([0,4,5,6,0,7,8])) is 7.
For a = {}, the result of type(a) is <class'set'>.
List can be used as keys of dictionaries.