How i can repeat python commands and change some parameter every time in repeat? I just searching and seems that here is not to easy way to do this?
Now i'am very close the finish this, but i do not wanna write this almost same command about 80 times with some another parameters.
I mean this: w and d +values change:
Cycle is like:
Now i'am very close the finish this, but i do not wanna write this almost same command about 80 times with some another parameters.
I mean this: w and d +values change:
w=50 d=56 #3 linesToCopy=range((w+16),(d+30)) with open('file1.txt') as f1, open('file3.txt', 'a') as f2: for i, line in enumerate(f1, 1): if i in linesToCopy: f2.write(line) #4 linesToCopy=range((w+20),(d+20)) with open('file2.txt') as f1, open('file3.txt', 'a') as f2: for i, line in enumerate(f1, 1): if i in linesToCopy: f2.write(line) #5 linesToCopy=range((w+36),(d+52)) with open('file1.txt') as f1, open('file3.txt', 'a') as f2: for i, line in enumerate(f1, 1): if i in linesToCopy: f2.write(line) #6 linesToCopy=range((w+42),(d+42)) with open('file2.txt') as f1, open('file3.txt', 'a') as f2: for i, line in enumerate(f1, 1): if i in linesToCopy: f2.write(line) #7 linesToCopy=range((w+58),(d+72)) with open('file1.txt') as f1, open('file3.txt', 'a') as f2: for i, line in enumerate(f1, 1): if i in linesToCopy: f2.write(line) #8 linesToCopy=range((w+62),(d+62)) with open('file2.txt') as f1, open('file3.txt', 'a') as f2: for i, line in enumerate(f1, 1): if i in linesToCopy: f2.write(line) #......80And yes, there is some same cycle every 2/4 command/file1 and 2
Cycle is like:
#3. file1 command w+16 d+30 #4. file2 command w+20 d+20 #5. file1 command w+36 d+52 (w+20 d+22 than before file1 command) #6. file2 command w+42 d+42 (w+22 d+22 than before file2 command) #7. file1 command w+58 d+72 (w+22 d+20 than before file1 command) #8. file2 command w+62 d+62 (w+20 d+20 than before file2 command) #9. file1 command w+78 d+94 (w+20 d+22 than before file1 command) #10. file2 command w+84 d+84 (w+22 d+22 than before file2 command) #11. file1 command w+98 d+114 (w+22 d+20 than before file1 command) #12. file2 command w+104 d+104 (w+20 d+20 than before file2 command)