'remove data at location key'

@staticmethod
def remove_entry(data, key, sep='.'):

    if ((key == '') and isinstance(data, dict)):
        data.clear()
        return True
    elif ((key == '') and isinstance(data, list)):
        del data[:]
        return True
    if ((not (key and Yedit.valid_key(key, sep))) and isinstance(data, (list, dict))):
        return None
    key_indexes = Yedit.parse_key(key, sep)
    for (arr_ind, dict_key) in key_indexes[:(-1)]:
        if (dict_key and isinstance(data, dict)):
            data = data.get(dict_key)
        elif (arr_ind and isinstance(data, list) and (int(arr_ind) <= (len(data) - 1))):
            data = data[int(arr_ind)]
        else:
            return None
    if key_indexes[(-1)][0]:
        if (isinstance(data, list) and (int(key_indexes[(-1)][0]) <= (len(data) - 1))):
            del data[int(key_indexes[(-1)][0])]
            return True
    elif key_indexes[(-1)][1]:
        if isinstance(data, dict):
            del data[key_indexes[(-1)][1]]
            return True
