Home / Report Question

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