[Solved] Remove the first items in a list of lists – make a copy instead of modifying in-place


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

solved Remove the first items in a list of lists – make a copy instead of modifying in-place