How to delete value from a multiple value to the sublist?

22 Views Asked by At

I want to remove Ben "True" data. How will I remove the true data?

customer_data = [["Ainsley", "Small", True], ["Ben", "Large", False], ["Chani", "Medium", True], ["Depak", "Medium", False]]

customer_data[2][2] = False
customer_data.remove()

print(customer_data)
1

There are 1 best solutions below

0
Tanveer On
for i in customer_data.copy():
    if "Ben" in i or True in i:
        customer_data.remove(i)