A conveyor belt buffer holds part numbers in a 1D list, where the front of the buffer is at index 0. two functions. The function add_part is passed the list and a part number and adds it to the back. The function take_part is passed the list, removes the part at the front and returns it, or returns None if the buffer is empty.
Loading subject…