Which of the following is correct about swap()?

Man Ly

New member
Which of the following is correct about swap()?
A. Swaps first element of both tuples
B. Swaps two tuples
C. Swaps elements of a tuple alternatively
D. Swaps last elements of two tuples
 
Answer: b
Explanation: swap() function is used to swap two tuples. For example t1 = {1,2} and t2 = {‘a’,’b’} then after swapping both the tuples becomes t1 = {‘a’,’b’} and t2 = {1,2}.
 

Tìm kiếm

Back
Top