Find and remove redundant spaces more than 1 in text
(text)
| 2193 | |
| 2194 | |
| 2195 | def remove_extra_spaces(text): |
| 2196 | """Find and remove redundant spaces more than 1 in text""" |
| 2197 | new_text = re.sub(r" {2,}", " ", text) |
| 2198 | |
| 2199 | return new_text |
| 2200 | |
| 2201 | |
| 2202 | def has_any_letters(text): |