Preprocess Text Function Python Questions On For Loop