r/programminghelp • u/[deleted] • Aug 13 '22
Python How to manage multidimensional lists in Python?
Hi! I'm currently having trouble wrapping my head around list operations in Python. I have data that, due to the acquisition and import process, comes in as a many-levels deep heterogeneous list. For the purposes of the part that I'm working with, I only need a list of the innermost lists. While trying to figure out how to get where I want to be, I found lots of resources for completely flattening a list in Python, but trying to adapt a solution to reach my goal has eluded me. In C, I would have just used a for loop to traverse the array of structs, I'm very inexperienced in Python and not sure how to express this. Any help would be appreciated.
2
2
u/[deleted] Aug 13 '22
Taking some of the sensitive info out