Discuss the below:
Q: Write a program that reads text from one file and writes an edited version of the same text to another file.
The edited version is identical to the unedited version except that every string of two or more consecutive blanks is replaced by a single space. Thus the text is edited to remove any extra blank characters. Your program should define a function that is called with the input and output file streams as arguments