Re: Collapse a list and eval ??

From: TAG (tonino.greco_at_gmail.com)
Date: 10/08/04


Date: Fri, 8 Oct 2004 10:25:37 +0200
To: limodou <limodou@gmail.com>

oohh - damn - forgot the join ;)
THANKS ;)

sometimes the simplest solution is often overlooked ;)

On Fri, 8 Oct 2004 16:23:18 +0800, limodou <limodou@gmail.com> wrote:
> data_collapsed = [''.join(data)]
>
>
>
>
> On Fri, 8 Oct 2004 10:20:05 +0200, TAG <tonino.greco@gmail.com> wrote:
> > HI,
> >
> > If I have a list :
> >
> > data=['round', '(', '(', 12345, '*', '-', '0.0025', ')', ',', '2', ')', '']
> >
> > how can I collapse it so that it becomes:
> > data_collapsed=['round((12345*-0.0025),2)']
> >
> > and then run an eval() on it ?
> >
> > Am I doing this the right way ?
> >
> > Thanks
> > Tonino
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
>
> --
> I like python!
>