def splitlists(old_list, new_list):
    """Compares lists of strings

    Returns three lists representing strings that have stayed the same,
    strings that have been added in *new_list* and finally strings that
    have been removed from *old_list*."""
    snew = set(new_list)
    sold = set(old_list)
    added = []
    removed = []
    common = []
    for newitem in new_list:
        if newitem in sold:
            common.append(newitem)
        else:
            added.append(newitem)
    for olditem in old_list:
        if olditem not in snew:
            removed.append(olditem)
    return common, added, removed
