Given:
a = [[1,2],[3,4],[5,6],[7,8]] b = 3
I would like to remove an item of a that has b as it\'s first item. S
a
b
If your list are small then you are also try filter ,
a = [[1,2],[3,4],[5,6],[7,8]] b = 3 print(list(filter(lambda x:x[0]!=b,a)))
output:
[[1, 2], [5, 6], [7, 8]]