Код: Выделить всё
d = {
'outer_key_1': {
'class': 'a_class',
'items': {
'A': { #
Подробнее здесь: [url]https://stackoverflow.com/questions/78415935/how-to-remove-parent-keys-from-a-nested-dictionary-if-child-keys-are-empty-witho[/url]
Код: Выделить всё
d = {
'outer_key_1': {
'class': 'a_class',
'items': {
'A': { #
Подробнее здесь: [url]https://stackoverflow.com/questions/78415935/how-to-remove-parent-keys-from-a-nested-dictionary-if-child-keys-are-empty-witho[/url]