I would like to know how I can remove the last element of each list, which is stored in a list. I have this example:
a=[ [1, 2, 3, 4, ''], [ 4, 5, 6, 7, ''], [ 8, 8, 8, 8, '']]
And I want to remove the last element of each list:
a_removed=[[1, 2, 3, 4],[4, 5, 6, 7], [8, 8, 8, 8]]
I have tried to use a map function and filter function, but they only work in a single list, not in a list of list.
Any ideas on this?
Thank you