CBSE Class 11 Informatics Practices Question 23 of 66

Dictionary — Question 6

Back to all questions
6
Question

Question 6

Which function is used to return a value for the given key?

  1. len()
  2. get()
  3. keys()
  4. None of these
Answer

get()

Reason — The get() method returns a value for the given key. If key is not available, then returns the default value None.