The preceding sections of this series have established the foundation for the present topic with the introduction of lists and…