Remove leading and trailing whitespace, and convert internal stretches of whitespace to a single space.
(s)
| 29 | |
| 30 | |
| 31 | def normalize_whitespace(s): |
| 32 | """ |
| 33 | Remove leading and trailing whitespace, and convert internal |
| 34 | stretches of whitespace to a single space. |
| 35 | """ |
| 36 | return ' '.join(s.split()) |
| 37 | |
| 38 | |
| 39 | def test_from_template(): |
no test coverage detected