Fraunhofer Interview Question

iterate through a list in python