GATEverse Practice, past papers & mock tests
GATE 2025 · session-5
Programming, Data Structures and AlgorithmsProgramming in PythonmediumMCQ2 marks
Consider the following Python code snippet. \[ A = \{"this", "that"\}, \quad B = \{"that", "other"\}, \quad C = \{"other", "this"\} \] \[ while "other" in C: \] \[ \quad if "this" in A: \] \[ \quad \quad A, B, C = A - B, B - C, C - A \] \[ \quad if "that" in B: \] \[ \quad \quad A, B, C = C | A, A | B, B | C \] When the above program is executed, at the end, which of the following sets contains "this"?
Save your progress

Related Programming, Data Structures and Algorithms PYQs