convert a list of delimited strings to a tree/nested dict, using python
I am trying to convert a list of dot-separated strings, e.g. ['one.two.three.four', 'one.six.seven.eight', 'five.nine.ten', 'twelve.zero'] into a tree (nested lists or dicts - anything that is easy to walk through). The real data happens to have 1 to 4 dot-separated parts of different length and has 2200 records in total. My actual goal is to fill in the set of 4 QComboBox'es with this data, in manner that the 1st QComboBox is filled with first set items ['one', 'five', 'twelve'] (no duplicates). Then depending on the chosen item, the 2nd QComboBox is filled with its related items: for 'one'