I am working on a compression algorithm for a specific data structure and part of it requires changing a string into a dictionary as follows:
"abc" => {'a':{'b':{'c':{}}}
Which is a group of nested dictionaries based on the letters of the word.
How can I do this in a recursive manner in python?