[ad_1]
Well, for this example, you could use list comprehension with slicing.
a = [[1, 2], [1, 2, 3], [1, 2, 3, 4]]
b = [x[1:] for x in a]
0
[ad_2]
solved Remove the first items in a list of lists – make a copy instead of modifying in-place
[ad_1]
Well, for this example, you could use list comprehension with slicing.
a = [[1, 2], [1, 2, 3], [1, 2, 3, 4]]
b = [x[1:] for x in a]
0
[ad_2]
solved Remove the first items in a list of lists – make a copy instead of modifying in-place