import sys
from pypdf import PdfMerger
import os

merger = PdfMerger()

for file in os.listdir(os.getcwd()):
    if file.endswith(".pdf"):
        print(file)
        merger.append(file)

merger.write('CombinedFile.pdf')