I am trying to write a for loop that adds the total budget of the films presented in a list.
How do I add the column of numbers in that list?
def get_records():
film_list = [] #start of list,
film_list.append(['FM01', 'Stealth', 135, 80])
film_list.append(['FM02', 'Supernova', 90, 15])
film_list.append(['FM03', 'Robin Hood', 100, 85])
film_list.append(['FM04', 'Rollerball', 70, 26])
film_list.append(['FM05', 'Rust', 85, 20])
return film_list
The first column is the id of each movie, the second is the title, and the third is the budget.
Which operator will add the budget column so that 135, 90, 100, 70, and 85 are added together?