Jun-22-2017, 08:28 PM
(Jun-22-2017, 06:04 PM)Tumppi Wrote: there is many "blocks" at the text files where I need copy and paste between the lines?
If here is not any easier method, i Will try this. Can you give example how i read two input files and write one?
How would you do it with paper & pencil? Think how to go forward step by step, how you can decide which line to look at next, which line to copy or not copy. As of now, I don't understand exactly what you want python to do, and it won't either. You need to be much more specific. Maybe make a small but complete example like you did above but with the new information that file2 can be longer as well, what would be the desired output, and how do you get there?