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

Explanation: Sets do not allow duplicates. The set becomes {1, 2, 3}, which has length 3.

Explanation by: Mr. Dubey
Sets do not allow duplicates. The set becomes {1, 2, 3}, which has length 3.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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