On 8/14/2009 1:09 PM Steven D'Aprano apparently wrote:
> Try this instead:
> 
>>>> from operator import getitem
>>>> reduce(getitem, (2, 1, 0), lst)
> 'aaa'
>>>> reduce(getitem, (2, 1, 0, 0), lst)
> 'a'
> 
> operator.getitem is less ugly too.


Yes, that's better.
Thanks,
Alan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to