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

Explanation: Sets automatically remove duplicate values, so only {1,2,3} remains.

Explanation by: Ankit Singh
Sets automatically remove duplicate values, so only {1,2,3} remains.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
77
Total Visits
πŸ“½οΈ
7 mo ago
Published
πŸŽ–οΈ
Ankit Singh
Publisher
πŸ“ˆ
99%
Success Rate