When executing data = {'a': 1, 'b': 2}; print(data.get(____, 'Not Found')), with a missing key, the output is "Not Found".

  • 'Not Found'
  • 'a'
  • 'b'
  • 'c'
The get method returns the value for the specified key or a default value if the key is not found. In this case, 'c' is not present, so it returns 'Not Found'.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *