Python - Rows with all List elementsGiven a Matrix, get all the rows with all the list elements.Input : test_list = [[7, 6, 3, 2], [5, 6], [2, 1, 8], [6, 1, 2]], sub_list = [1, 2]Output : [[2, 1, 8], [6, 1, ... Read More Python - Consecutive identical elements countGiven the elements list, get all the elements that have an identical element as the next element.Input : test_list = [4, 5, 5, 5, 5, 6, 6, 7, 8, 2, 2, 10]Output : 3Explana... Read More Python - Redistribute Trimmed ValuesGiven a List, redistribute values trimmed by K.Examples:Input : test_list = [4, 5, 2, 8, 9, 3, 1, 2, 4], K = 2Output : [5.0, 11.0, 12.0, 6.0, 4.0]Explanation : 4, 5, 2, 4 ... Read More Python - Test if tuple list has Single elementGiven a Tuple list, check if it is composed of only one element, used multiple times.Input : test_list = [(3, 3, 3), (3, 3), (3, 3, 3), (3, 3)]Output : TrueExplanation : A... Read More Python - Merge keys by valuesGiven a dictionary, merge the keys to map to common values.Examples:Input : test_dict = {1:6, 8:1, 9:3, 10:3, 12:6, 4:9, 2:3}Output : {'1-12': 6, '2-9-10': 3, '4': 9, '8':... Read More