Python Program to Filter Rows with a specific Pair Sum
Given Matrix, the following program shows how to extract all rows which have a pair such that their sum is equal to a specific number, here denoted as K. Input : test_list = [[1, 5, 3, 6], [4, 3, 2, 1], [7, 2, 4, 5], [6, 9, 3, 2]], k = 8 Output : [[1, 5, 3, 6], [6, 9, 3, 2]] Explanation : 5 + 3 = 8