Preprocess Text Function Python Syntax For Variables