def dequote(string, dictionary):
        """Replace quoted parts of string with dictionary entries."""
        parts = string.split('"')
        for i in range(1, len(parts), 2):
            parts[i] = dictionary[parts[i]]
        return ''.join(parts)
Replace quoted parts of string with dictionary entries.
recipes/Python/231347_String_substitution_shorty/recipe-231347.py