Suppose I have a file named "file.txt".
- First I would like to open the file.txt file and delete all paragraphs from the file,
- Then I would like to delete all spaces in the file (which also include tabs),
- Finally, I would like to save the file file.txt with the previous changes.
Example of desired input:
Text1 Text2 Text3
Text4 Text5 Text5
Example of expected output:
Text1Text2Text3Text4Text5Text6
How could I do this with Python?