Spaces:
Sleeping
Sleeping
| import re | |
| def clean_text(text): | |
| text = text.strip() | |
| text = re.sub(r'[\n\r\t]', ' ', text) | |
| text = re.sub(r'[ ]{2,}', ' ', text) | |
| return text | |