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
  • 63,701
  • 20
  • 147
  • 175
miik
  • 663
  • 1
  • 8
  • 23

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,301
  • 19
  • 19