import math


def listLength(list1, list2):
    """
    Checks the length of two Python Lists. If the length is not equal,
    the shoerter one is filled with infinite values.
    :param list1: shorter list
    :param list2: list to compare against
    :return: corrected list1
    """

    if len(list1) != len(list2):
        Diff = abs(len(list2) - len(list1))
        list1 = list1 + Diff * [math.inf]
    else:
        list1 = list1
    return list1