Loop Through Array In Python Definition Functionary