Search code examples
lines

duplicated lines in simple text with numbering at first and middle and last


Picture to see the problem : https://i.sstatic.net/RAhXJ.jpg

I want every line will be just duplicated , and only number change every single line numbering (1, 2 3 4 5) until 100 or more.

There is other number can content the line (2015) so i want leave it alone not change or maybe can have a lot of numbers at 1 line so i want keep them same.

I hope someone can suggest any idea to do this faster.

I don't want copy line more than 100 time and edited manually each line.

picture to see the problem : https://i.sstatic.net/RAhXJ.jpg


Solution

  • You could simply run this Python script and copy and paste that:

    for i in range(1, 101):
        print("'title", i, " anything else' , 'title ", i, "' , '", i, " title anything else' , 'title 2015 anything'", sep="")
    

    Or if you don't have an interpreter, you can use this online interpreter: https://repl.it/languages/Python3