Swift Loop Through Array Python Definition