def add_to_dict(someDict, filename, someNums):
    with open(filename, 'r') as f:
        for num, line in enumerate(f):
            if num in someNums:
                if num not in someDict:
                    someDict[num] = []
someDict[num].append(line)
myDict = {}
lineNums = [2, 45, 13, 56]
add_to_dict(myDict, 'file1.txt', lineNums)
add_to_dict(myDict, 'file2.txt', lineNums)
Zip lines in a file with a list and iterate