Fraunhofer interview question

iterate through a list in python