how to remove the above elements from list from matrix by python

  python
matrixA = 
[['AAA', 'BBB', 'CCC'],
['PPP', 'QQQ', 'RRR', 'SSS'],
['DDD','EEE','FFF'],
['GGG', 'HHH', 'III']]

how to remove the above elements from listA from matrixA

listA = ['DDD', 'EEE', 'FFF']

Desired output:

output_matrix = 
[['DDD','EEE','FFF'],
['GGG', 'HHH', 'III']]

sorry for my bad language

Source: Python Questions

LEAVE A COMMENT