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