Q. How do you create a set in Python?

  • (A) s = {}
  • (B) s = []
  • (C) s = set()
  • (D) s = ()
πŸ’¬ Discuss
βœ… Correct Answer: (C) s = set()
Explanation: Empty curly braces create an empty dictionary. Use `set()` for an empty set.
Explanation by: Mr. Dubey
Empty curly braces create an empty dictionary. Use `set()` for an empty set.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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