1

I have this array:

[160, 177], [162, 169], [163, 169], [166, 173], [166, 176], [166, 177], [169, 176], [169, 177]]

How can I split it into 2 separate arrays so it becomes:

[160,162,163,166,166,166,169,169]

and

[177,169,169,173,176,177,176,177]

Lev Levitsky
  • 59,844
  • 20
  • 139
  • 166
miik
  • 661
  • 1
  • 7
  • 19

1 Answers1

2

This should do it

l = [[160, 177], [162, 169], [163, 169], [166, 173], [166, 176], [166, 177], [169, 176], [169, 177]]
l1, l2 = zip(*l)
FastTurtle
  • 2,201
  • 15
  • 18