Python - Summation of consecutive elements power
Given a List, the task is to write a Python program to compute summation of power of consecutive elements occurrences frequency. Examples: Input : test_list = [2, 2, 2, 3, 3, 3, 3, 4, 4, 5] Output : 110 Explanation : 2^3 + 3^4 + 4^2 + 5 = 110 Input : test_list = [2, 2, 2, 3, 3, 3, 3, 4, 4] Output :