i've achived these 2 things. find possible sublists of list in given range (i ,j) . a = [ 44, 55, 66, 77, 88, 99, 11, 22, 33 ] let, = 2 , j = 4 then, possible sublists of list "a" in given range (2,4) : [66], [66,77], [66,77,88], [77], [77,88], [88] and, minimum of resultant product after multipying elements of sublists: so, resultant list after multiplying elements in above sublists become x = [66, 5082, 447216, 77, 6776, 88]` now, minimum of above list, min(x) i.e 66 my code : i, j = 2, 4 = [ 44, 55, 66, 77, 88, 99, 11, 22, 33 ] o, p = i, mini = a[o] while o <= j , p <= j: if o == p: mini = min(mini, reduce(lambda x, y: x * y, [a[o]])) else: mini = min(mini, reduce(lambda x, y: x * y, a[o:p + 1])) p += 1 if p > j: o += 1 p = o print(mini) my question: this code taking more time executed larger lists , larger ranges ! there possible "pythonic" way of reducing time c...