txt = " the #3 flight attendant has done a good job. the flight attendant #1 has helped flight \
attendant#3"
txt = re.sub('(?<=\w)([!#,])', r' \1', txt) ## Added a space before #
txt = ' '.join(txt.split()) ## Remove multiple white space
txt_list_tok = txt.split()
txt_list_tok
Как я могу заменить консультативные 3 токена, такие как «# 3», «рейс», «сопровождающий» или «рейс», «сопровождающий», «№ 3» на «ПОЛЕТ», «АТТЕНДАНТ» в python 3,6