πŸ“Š Python
Q. What does `dict.get('key', 'default')` return if the key is not found?
  • (A) Error
  • (B) None
  • (C) 'default'
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (C) 'default'

Explanation: `get()` returns the provided default value if the key does not exist.

Explanation by: Mr. Dubey
`get()` returns the provided default value if the key does not exist.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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