Q4Single correct3 Marks13 Apr 2025
Consider the following Python code snippet:
At the end of execution, which of the following sets contains "apple"?
```
X = {"apple", "banana"}
Y = {"banana", "cherry"}
Z = {"cherry", "apple"}
while "cherry" in Z:
if "apple" in X:
X, Y, Z = Y, Z, X
if "banana" in Y:
X, Y, Z = Z, X, Y
```