I have a list of lists which contain different values and different lengths.
I want my code to iterate the "big list", and if an "item-list" (a sub-list in the big list) follows a condition (for example, len(list[i] > 1
), I want to add this "item-list" to a new big list, so at the end, I will get a new list of lists (which all follow the condition).
The append()
methoddoesn't work when I want to append a whole list.
Do you have any suggestion, how should I do it?