-4
A=[[1,3,5,7],[2,5,8,12,16],[4,7,8,12]]

I would like the result to be

[1,3,5,7][2,5,8,12,16][4,7,8,12]
amrs-tech
  • 485
  • 2
  • 14
Gamer19
  • 7
  • 4

1 Answers1

0

you can unpack your list A like this:

A = [[1,3,5,7],[2,5,8,12,16],[4,7,8,12]]

list1, list2, list3 = A

print(list1, list2, list3)

output:

[1, 3, 5, 7] [2, 5, 8, 12, 16] [4, 7, 8, 12]

in this case, you have to be sure that A has always 3 lists inside

kederrac
  • 16,819
  • 6
  • 32
  • 55