x = [1, 2, 3]
y = x.copy()
x.append(4)
print(y)
Right Answer:
The copy() method creates a shallow copy of the list, so changes made to the original list “x” will not affect the copied list “y”. Therefore, the output will be [1, 2, 3].
Right Answer:
The copy() method creates a shallow copy of the list, so changes made to the original list “x” will not affect the copied list “y”. Therefore, the output will be [1, 2, 3].
Right Answer:
Dictionaries in Python are used to store collections of items where each item is indexed by a key.
Right Answer:
Booleans in Python are used to represent true or false values.