def create_pairs(X, Y):
    L = []
    for i in range(len(X)):
        L.append((X[i], Y[i]))
    return L


class MyExceptionClass(Exception):
    pass


def create_pairs(X, Y):
    if len(X) != len(Y):
        raise MyExceptionClass('X and Y have different length')
    return list(zip(X, Y))


print(create_pairs([1, 2, 3], [4, 5, 6]))

try:
    print(create_pairs([1, 2, 3], [4, 5]))
except MyExceptionClass:
    print('I should not have done that')
