Q. What is the output of the following?

Code:
print(set([1,2,2,3,4,4]))
  • (A) {1, 2, 3, 4}
  • (B) [1, 2, 2, 3, 4, 4]
  • (C) (1, 2, 3, 4)
  • (D) {1, 2, 2, 3, 4, 4}
πŸ’¬ Discuss
βœ… Correct Answer: (A) {1, 2, 3, 4}
Explanation: Sets automatically remove duplicates.
Explanation by: Mr. Dubey
Sets automatically remove duplicates.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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