Homework Statement
Write a function spacereplace(txt) that removes two or more spaces in a row, replacing them with a single space. Any other characters should remain the same.
The Attempt at a Solution
I tried this:
def spacereplace(txt):
f=txt.replace(" "," ")
return f...