I have a list with tuples that containing names. These names are parent and child names and I want to create a hierarchical dictionary tree with their names. For example I have the following list:
[('john','marry'),('mike','john'),('mike','hellen'),('john','elisa')]
and I want to create this:
{
'mike':{
'john':{
'marry':{}
'elisa':{}
}
'hellen':{}
}
}