[Zope] removing an item from a list

Peter Sabaini cccp@oeh.tu-graz.ac.at
Tue, 19 Jun 2001 18:22:52 +0200 (CEST)


On Tue, 19 Jun 2001, Junk wrote:

> ---
> If the thing in question is really a list not a string as you show here then
> couldn't you do something like:
> bozo.del[2]
> which should delete the third item in the list.
> ---
>
> problem is i don't know where the string is, i only know it's contents...
>
> and it "seems" to behave like a list because i can use
> _.whrandom.choive(bozo) succesfully on it.
>
> i'm still in the dark ;-)
>
> $ven


I'd move something like this to Python if its at all possible.

There, something like

l = ['a','b','c']
x = some_randomizing_stuff()
l.remove(x)

should work I think?


Hth,
peter.


-- 

_____________________________________________________________________
peter sabaini, mailto: c c c p@oeh.tu-graz.ac.at
"technology: connections that won't, upgrades that can't, hotsyncs
that don't, standards that never are, wireless transmittors radiating
who knows what..." (wash. post)