Delete a List with given name
968245
def DeleteList(self, listName):
        """"""

        # Build Request
        soap_request = soap('DeleteList')
        soap_request.add_parameter('listName', listName)
        self.last_request = str(soap_request)

        # Send Request
        response = self._session.post(url=self._url('Lists'),
                                      headers=self._headers('DeleteList'),
                                      data=str(soap_request),
                                      verify=self._verify_ssl,
                                      timeout=self.timeout)

        # Parse Request
        if response == 200:
            return response.text
        else:
            return response
941185
function removeFromList(i, L, R) {
    R[L[i]] = R[i];
    L[R[i]] = L[i];
    R[i] = i;
    L[i] = i;
}
737272
function removeValueFromList(list, value) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i] == value) {
            return list.splice(i, 1); // remove from array
        }
    }
    return false;
}
938938
def delete_(*keyname):
    '''
    
    '''
    mdata = _check_mdata_delete()
    valid_keynames = list_()
    ret = {}

    for k in keyname:
        if mdata and k in valid_keynames:
            cmd = '{0} {1}'.format(mdata, k)
            ret[k] = __salt__['cmd.run_all'](cmd, ignore_retcode=True)['retcode'] == 0
        else:
            ret[k] = True

    return ret
1225604
def __find_and_remove_value(list, compare):
    """"""
    # next throws if there are no matches
    try:
        found = next(value for value in list
                     if value['name'] == compare['name'] and value['switch'] ==
                     compare['switch'])
    except:
        return None

    list.remove(found)

    return found
1200205
def destroy(self, names):
        '''
        
        '''
        mapper = salt.cloud.Map(self._opts_defaults(destroy=True))
        if isinstance(names, six.string_types):
            names = names.split(',')
        return salt.utils.data.simple_types_filter(
            mapper.destroy(names)
        )
528096
private void doListRemove(final Message<JsonObject> message) {
    final String name = message.body().getString("name");
    if (name == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified."));
      return;
    }

    if (message.body().containsField("index")) {
      final int index = message.body().getInteger("index");

      context.execute(new Action<Object>() {
        @Override
        public Object perform() {
          return data.getList(formatKey(name)).remove(index);
        }
      }, new Handler<AsyncResult<Object>>() {
        @Override
        public void handle(AsyncResult<Object> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putValue("result", result.result()));
          }
        }
      });
    } else {
      final Object value = message.body().getValue("value");
      if (value == null) {
        message.reply(new JsonObject().putString("status", "error").putString("message", "No value specified."));
      } else {
        context.execute(new Action<Boolean>() {
          @Override
          public Boolean perform() {
            return data.getList(formatKey(name)).remove(value);
          }
        }, new Handler<AsyncResult<Boolean>>() {
          @Override
          public void handle(AsyncResult<Boolean> result) {
            if (result.failed()) {
              message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
            } else {
              message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
            }
          }
        });
      }
    }
  }
1199982
def remove(self, value):
        
        self._set.remove(value)
        self._list.remove(value)
607814
def del_option_by_name(self, name):
        
        for o in list(self._options):
            assert isinstance(o, Option)
            if o.name == name:
                self._options.remove(o)
636397
def delete(name, attributes):
    '''
    
    '''
    ret = {'name': name,
           'result': True,
           'comment': '',
           'changes': {}}

    if not os.path.exists(name):
        ret['result'] = False
        ret['comment'] = "File or directory doesn't exist"
        return ret

    current_attrs = __salt__['xattr.list'](name)
    current_ids = current_attrs.keys()

    for attr in attributes:

        if attr in current_ids:
            __salt__['xattr.delete'](name, attr)
            ret['changes'][attr] = 'delete'

    if not ret['changes']:
        ret['comment'] = 'All attributes were already deleted.'

    return ret
634485
public static void removeFromList(List<String> list, String value) {
        int foundIndex = -1;
        int i = 0;
        for (String id : list) {
            if (id.equalsIgnoreCase(value)) {
                foundIndex = i;
                break;
            }
            i++;
        }
        if (foundIndex != -1) {
            list.remove(foundIndex);
        }
    }
399734
def remove(self, list):
        
        xml = SP.DeleteList(SP.listName(list.id))
        self.opener.post_soap(LIST_WEBSERVICE, xml,
                              soapaction='http://schemas.microsoft.com/sharepoint/soap/DeleteList')
        self.all_lists.remove(list)
671052
def delete(self):
        
        if self.fullname != "":
            try:
                os.remove(self.fullname)
            except IOError:
                print("Cant delete ",self.fullname)
1334533
def remove_many(self, it):
        """"""
        # find indicies of objects in iterable
        to_be_deleted = list(it)
        del_indices = []
        for i, ob in enumerate(self.obs):
            try:
                tbd_index = to_be_deleted.index(ob)
            except ValueError:
                continue
            else:
                del_indices.append(i)
                to_be_deleted.pop(tbd_index)

            # quit early if we have found them all
            if not to_be_deleted:
                break

        for i in sorted(del_indices, reverse=True):
            self.pop(i)

        return self
974174
function removeKeyFromList(list, key, value) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i][key] == value) {
            return list.splice(i, 1); // remove from array
        }
    }
    return false;
}
1160950
def remove(name):
    '''
    
    '''
    # Putting quotes around the parameter protects against command injection
    cmd = 'Uninstall-Module "{0}"'.format(name)
    no_ret = _pshell(cmd)
    return name not in list_modules()
7919
public void put(String name,List list)
    {
        if (list==null || list.size()==0)
        {
            remove(name);
            return;
        }
        
        Object v=list.get(0);
        if (v!=null)
            put(name,v.toString());
        else
            remove(name);
        
        if (list.size()>1)
        {    
            java.util.Iterator iter = list.iterator();
            iter.next();
            while(iter.hasNext())
            {
                v=iter.next();
                if (v!=null)
                    add(name,v.toString());
            }
        }
    }