Program that reads 4 files and outputs contents of it into another file after formatting it
I think that zip can save you some work:

with open('a.txt', 'r') as file_a, open('b.txt', 'r') as file_b, \
     open('c.txt', 'r') as file_c, open('d.txt', 'r') as file_d:
         for content in zip(file_a.readlines(), file_b.readlines(),
                            file_c.readlines(), file_d.readlines()):
             print(content)


The above is just a basic example, you will want to:


Add error checking (asserting for example)
Add an output file
Add necessary spaces