Die Suche ergab 1 Treffer

von catlover123
Mittwoch 21. März 2018, 19:08
Forum: Allgemeine Fragen
Thema: Verschachtelte Tupel und Dicts textuell speichern
Antworten: 6
Zugriffe: 1511

Verschachtelte Tupel und Dicts textuell speichern

Hallo!

Ich habe eine Baumstruktur (BK-Trees) in folgender Form gespeichert:

( word, {int : (word, {int : (word, {})}), ...)

hier nochmal ein kleines Beispiel:
tree = ('Buch', {3: ('Baum', {}), 4: ('Tier', {5: ('Wurst', {4: ('Blatt', {})}), 4: ('Haus', {1: ('Maus', {}), 3: ('Darm', {})})}), 2 ...