Python Ll Read Content Text File Named Txt Reformat Justified Left Right Sides Store Resul Q43830989
IN PYTHON, you’ll have to read the content of a text file named”In.txt” and then reformat it to be justified on both the left andright sides and store the result in a file named “Out.txt”.
The length of a single line in the output file is 80characters.
You should do this by rearranging the words on a single line to fit80 characters without breaking a word on two lines. You should thenredistribute the spaces left between the words of the said line sothat every line starts with a word and ends with another (i.e. aline should never end with a space).
Expert Answer
Answer to IN PYTHON, you’ll have to read the content of a text file named “In.txt” and then reformat it to be justified on both th…
OR