Ganny Entmt
Ganny Entmt

Reputation: 1

Extraction particular portion from text file using python

As mention below I have A1 to A300 Specific set of information in a single text file named full change.txt

If ***** Begin ****A1 End Go

If ***** Begin ****A2 End Go ………..

I have 300 files and each file saved as A1.txt, A2.txt till A300txt

My request is I want to split each set based on A1,A2 separately from full change.txt and append them at end of the line of those 300 files based on file name

Example : Extract the below snippet

If ***** Begin ****A1 End Go

From full change.txt to A1.txt

Please let me know the solution

It would be really helpful

I tried split function but unable to achieve

Upvotes: 0

Views: 17

Answers (0)

Related Questions