πŸ“Š Python
Q. What is the output of the following code?
Code:
x = 10
y = 5
x, y = y, x
print(x, y)
  • (A) 10 5
  • (B) 5 10
  • (C) 10 10
  • (D) 5 5
πŸ’¬ Discuss
βœ… Correct Answer: (B) 5 10

Explanation: Values of `x` and `y` are swapped using tuple unpacking.

Explanation by: Mr. Dubey
Values of `x` and `y` are swapped using tuple unpacking.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
42
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate