def separate_list(inlist, rule):
    """
    Separates a list in two based on the rule.
    The rule is a string that is mached for last characters of list elements.
    """
    lrule = len(rule)
    list1 = []
    list2 = []
    for item in inlist:
        if (item[-lrule:] == rule):
            list1.append(item)
        else:
            list2.append(item)
    return list1, list2