A

Admin • 802.91K Points
Coach

Q. Which of the following is equivalent to `d['key'] = d.get('key', 0) + 1`?

  • (A) d.increment('key')
  • (B) d.update({'key': 1})
  • (C) d['key'] += 1
  • (D) None of the above

Explanation by: Admin
None of the options replicate the logic of `get` with default + assignment.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.