Preprocess Text Function Python Example For Loop