Let's say I have this line in TXT file:
ABCD1EFGH
What I want to do is repeat the line for an amount number of times but the number 1 will increase by 1 every time it duplicates. like that:
ABCD1EFGH
ABCD2EFGH
ABCD3EFGH
ABCD4EFGH
What is the code for Python to do so?
I haven't tried any method yet, I have no clue.
I'll let the part of reading from a file and writing back to it as an exercise for you.
Also according to your example I assume the number is prefixed and suffixed by exactly 4 characters