I am very close to the end result. I now have it as Output [ ['[glossary]'], ['[glossary]', '[title]'], ['[glossary]', '[GlossDiv]'], ['[glossary]', '[GlossDiv]', '[title]'], ['[glossary]', '[GlossDiv]', '[GlossList]'], ['[glossary]', '[GlossDiv]', '[GlossList]', '[GlossEntry]'], .........]
I used. elements = [['[{0}]'.format(element) for element in elements]for elements in data] Is there a good way to strip the ', ' and make the list a list of 1 element lists? Thoughts on achieving this? So [ ['[glossary]'], ['[glossary][title]'], ....] Cheers Sayth -- https://mail.python.org/mailman/listinfo/python-list