Right Answer:
The code snippet prints the data type of the variable “x”, which is a set. The correct type name in Python is “set”.
x = {"apple", "banana", "cherry"}
print(type(x))
Right Answer:
The code snippet prints the data type of the variable “x”, which is a set. The correct type name in Python is “set”.
x = {"apple", "banana", "cherry"}
print(type(x))
Right Answer:
The clear() method removes all elements from the set.
Right Answer:
Lists in Python are used to store collections of items where each item is indexed by a numerical index.