before drawing the food squarescheck if the bouncer has overlapped any of the food squares if it hasremove that food square from the foods list this waypython won' draw any food squares that the bouncer has "eatenon each iteration through the for loopthe current food square from the foods (plurallist is in the variable food (singulardon' add to or delete from list while iterating over it notice that there' slight difference with this for loop if you look carefully at line it isn' iterating over foods but actually over foods[:remember how slices work foods[: evaluates to copy of the list with the items from the start and up to (but not includingthe item at index foods[ :evaluates to copy of the list with the items from index to the end of the list foods[:will give you copy of the list with the items from the start to the end basicallyfoods[:creates new list with copy of all the items in foods this is shorter way to copy list thansaywhat the getboardcopy(function does in the previous tic tac toe game you cannot add or remove items from list while you are iterating over it python can lose track of what the next value of food variable should be if the size of the foods list is always changing think of how difficult it would be to count the number of jelly beans in jar while someone was adding or removing jelly beans but if you iterate over copy of the list (and the copy never changes)adding or removing items from the original list won' be problem removing the food squares if dorectsoverlap(bouncer['rect']food)foods remove(foodline is where dorectsoverlap(comes in handy if the bouncer and the current food square two rectangles overlapthen dorectsoverlap(will return true and line removes the overlapping food square from the foods list drawing the food squares on the screen draw the food for in range(len(foods))pygame draw rect(windowsurfacegreenfoods[ ]