I have the following list of tuples:
[(0, 1), (1, 2), (1, 3), (3, 4), (5, 6), (4, 6)]
I want the following nested Dictionary:
{
"0":{
"1":{
"2":{},
"3":{
"4":{
"6":{}
}
}
}
},
"5":{
"6":{}
}
}
What approach should be followed to convert the above list of tuples into a nested dictionary as illustrated above? Basically, I wanted to store the following graph nodes and their relationship as a dictionary.
