How can I convert:
THIS = \ ['logging', ['logging', 'loggers', ['logging', 'loggers', 'MYAPP', ['logging', 'loggers', 'MYAPP', '-handlers'], ['logging', 'loggers', 'MYAPP', 'propagate'] ] ], ['logging', 'version'] ]
in
THAT = [ ['logging'], ['logging', 'version'], ['logging', 'loggers'], ['logging', 'loggers', 'MYAPP'], ['logging', 'loggers', 'MYAPP', '-handlers'], ['logging', 'loggers', 'MYAPP', 'propagate'] ]
in python (no need to sort it, just flatten it)?
I have tried many things but cannot find how to solve this.
python
jbrown
source share