What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-03 10:09:03
how to group lists per index in python
# initializing the list lists = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] # empty list result = [] # variable to 0 index = 0 # iterating over the sub_list length (3) times for i in range(len(lists[0])): # appending an empty sub_list resu... Add solution
Best helpers
Snagulus
+5
Adam Dexter
+5
Gbarry
+5
ANeves
+5
Hi-yi
+5
Tick tock
+5
Wolf
+5
Ent
+5
Rajesh Paul
+5
Scared Guy
+5
Jela
+5
Nathaniel
+5
Jason Heo
+5
Freddie
+5
Man-kit LI
+5
Naved Ame
+5
John Kuhl
+5
IberoMedia
+5