Given Dual Tuples List, remove pairs with differences greater than K.
Input : test_list = [(4, 8), (1, 7), (9, 12), (3, 12), (2, 10)], K = 6
Output : [(4, 8), (9, 12), (1, 7)]
Explanation : 4 (8 - 4), 3 (12 - 9) and 6 are all not greater than 6, hence retained.
Input : test_list = [(4, 8), (1, 7), (9, 12), (3, 12), (2, 10)], K = 3
Output : [(9, 12)]
Explanation : 3 (12 - 9) is not greater than 3, hence retained.
OutputThe original list is : [(4, 8), (1, 7), (9, 12), (3, 12), (2, 10)]
Tuples List after removal : [(4, 8), (9, 12)]
OutputThe original list is : [(4, 8), (1, 7), (9, 12), (3, 12), (2, 10)]
Tuples List after removal : [(4, 8), (9, 12)]
OutputTuples List after removal : [(4, 8), (9, 12)]
OutputThe original list is : [(4, 8), (1, 7), (9, 12), (3, 12), (2, 10)]
Tuples List after removal : [(4, 8), (9, 12)]