Apr-21-2018, 04:11 AM
i have tried the following:
a = [-1, 2, -2, 3, 41, 38, 22, 10, -1, 3] b = [40, 30, 20, 10] k=0 for i in range(0,len(a)): k = k +1 ab = a[k:(k+4)] if len(ab) != 4: break else: print(ab)This gives me lists of lists i need from a, but now i am stuck on how to actually multiple it by the values in b