# Will update the character count based on the used word def updateHand(hand, word) # this is where the magic happens before = {'a': 1, 'b': 2, 'c': 3} after1 = updateHand(before, 'abc') after2 = updateHand(before, 'abc')