πŸ“Š Python
Q. Which of these is the correct syntax for a dictionary in Python?
  • (A) {'a':1, 'b':2}
  • (B) [a:1, b:2]
  • (C) (a=1, b=2)
  • (D) {1,2,3}
πŸ’¬ Discuss
βœ… Correct Answer: (A) {'a':1, 'b':2}

Explanation: Dictionaries use curly braces `{}` with key-value pairs separated by `:`.

Explanation by: Rati Dubey
Dictionaries use curly braces `{}` with key-value pairs separated by `:`.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
47
Total Visits
πŸ“½οΈ
4 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
82%
Success Rate