I have a text file, named Gens.txt, in the followig format Heading1 : This is first line Heading2 : This is second line Heading3 : This is third line I want to write a code which does the following: 1. Reads a line from this file and substitutes the number of prefix spaces at the start of line and followed by #. 2. The portion after : is made uniform in terms of spaces i.e. each word is followed by only one space. 3. The line thus produced is to be written to a text file named GensByMaple.txt. For example the first two lines would become like the following: 8#Heading1 : This is first line 12#Heading2 : This is second line Thanks.

Please Wait...