我有這個詞典:Python中的嵌套字典reStructuredText的項目列表
d = {'B': {'ticket': ['two', 'three'], 'note': ['nothing to report']}, 'A': {'ticket': ['one'], 'note': ['my note']}, 'C': {'ticket': ['four'], 'note': ['none']}}
,我試圖將其轉換成.rst文件作爲子彈列表,如:
* A
* ticket:
* one
* note
* my note
* B
* ticket:
* two
* three
* note:
* nothing to report
* C
* ticket:
* four
* note:
* none
我閱讀this approach但我不能翻譯成一個符號列表
感謝所有
你嘗試用模板經理?另一個(相關)問題:可能是深度(嵌套等級)無限? – gunzapper