Python - Remove Elements in K distance with N
Given a list, remove all elements which are within K distance with N. Input : test_list = [4, 5, 9, 1, 10, 6, 13 ], K = 3, N = 5 Output : [9, 1, 10, 13] Explanation : 4 is removed as 5 - 4 = 1 < 3, hence its within distance. Input : test_list = [1, 10, 6, 13 ], K = 3, N = 5 Output : [1, 10, 13] E