Expand and flatten a ragged nested list
问题 I know that the topic of flattening a nested list has been covered in great detail before, however I think my task is a bit different and I couldn't find any info. I am writing a scraper, and as output I get a nested list. The top level list elements are supposed to become rows for data in spreadsheet form. However, since the nested lists are often of different lengths, I need to expand them before flattening the list. Here's an example. I have [ [ "id1", [["x", "y", "z"], [1, 2]], ["a", "b",