πŸ“Š Python
Q. What is the output of the following code?
Code:
x = (1, 2, 3)
x[0] = 5
  • (A) (5, 2, 3)
  • (B) Error
  • (C) (1, 2, 3)
  • (D) (1, 5, 3)
πŸ’¬ Discuss
βœ… Correct Answer: (B) Error

Explanation: Tuples are immutable, so their elements cannot be modified.

Explanation by: Ankit Singh
Tuples are immutable, so their elements cannot be modified.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
46
Total Visits
πŸ“½οΈ
4 mo ago
Published
πŸŽ–οΈ
Ankit Singh
Publisher
πŸ“ˆ
97%
Success Rate