jumlah array python sampai indeks
def sum_up_to_index(lst, index):
return sum(lst[:index])
Powerful Penguin
def sum_up_to_index(lst, index):
return sum(lst[:index])