On 2007-06-07, Dustan <[EMAIL PROTECTED]> wrote:
> On Jun 7, 1:30 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>> On 2007-06-07, Stebanoid <[EMAIL PROTECTED]> wrote:
>>
>> > if you have a list of functions you can try this:
>>
>> > import random
>> > import math
>> > m[int(math.floor(len(m)*random.random()))]()  # seems like Lisp
>>
>> Or rather m[random.randint(0, len(m))]()
>
> Or rather random.choice(m)() # seems like Python

Sweet!

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to