While writing a txt file using python, say, I have to include "]" at the end of every sentence. I don't know the length of each sentence. But, I have to ensure that "]" is the 50th character in the line. (The length of sentence will be lesser than 50). The text in the file should appear like below:
Apple ]
Ball ]
Cat ]
Dog ]
Elephant ]
Frog ]
Something like:
out.txt