def islistsimilar(l1, l2, verb=False, dtol=DTOL):
    # set return value to True
    r = True

    # print out any keys not in both dictionaries
    if len(l1) != len(l2):
        r = False
        if verb:
            print("Lists not of same length:", len(l1), len(l2))

    # loop over keys in both sets
    for v1, v2 in zip(l1, l2):
        if not isitemsimilar(v1, v2, verb=verb, dtol=dtol):
            r = False

    return r
Compare two lists (or iterable) for differences
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/util/misc.py/islistsimilar