Python Loop Through Specific Performance