string to list

Hemanth H.M hemanth.hm at gmail.com
Thu Jun 14 03:40:33 EDT 2012


>>> list(literal_eval('"aa","bb 'b'","cc"'))
['aa', 'bb ', 'cc']

Strange?

On Thu, Jun 14, 2012 at 1:09 PM, Hemanth H.M <hemanth.hm at gmail.com> wrote:

> @Annop Nice one, but you seem to have missed a parenthesis.
>
> >>> list(literal_eval("'aa','bb','cc'")  should have been >>>
> list(literal_eval("'aa','bb','cc'"))
>
>
> On Thu, Jun 14, 2012 at 12:58 PM, Anoop Thomas Mathew <atmb4u at gmail.com>wrote:
>
>> >>> list(literal_eval("'aa','bb','cc'")
>
>
>
>
> --
> *'I am what I am because of who we all are'*
> h3manth.com <http://www.h3manth.com>
> *-- Hemanth HM *
>



-- 
*'I am what I am because of who we all are'*
h3manth.com <http://www.h3manth.com>
*-- Hemanth HM *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120614/87862566/attachment.html>


More information about the Python-list mailing list