I have 3 lvls deep list as follows:
parent = [
[
{'x': 1, 'y': 2},
{'x': 3, 'y': 8},
.
.
.
],
[
{'x': 8, 'y': 5},
{'x': 9, 'y': 6},
.
.
.
]
]
I am trying to use list comprehension to get all the x into a list and all the y into another list
I tried something like this: [gc for gc in [c for c in [p.get('x') for p in parent]]]
but the get('x') is still hitting a list instead of an element, mainly because of the most inner []. Any idea how to achieve this?