Re: string to list conversion

2009-02-19 Thread Srinivas
John, Try the following code .. hope this helps and solves your problem . I have run in the interactive mode >>> s='' >>> a=[s,'12'] >>> print a ['', '12'] regards Srinivas -- http://mail.python.org/mailman/listinfo/python-list

Re: string to list conversion

2009-02-19 Thread MRAB
John Forse wrote: I need to convert an input string say '' to a list of the form ['' ,]. If I use list(stringname), I get ['x','x','x','x'] ; list.join() is an error; and str.join() won't use lists. I do need the comma after the string. Is there a simple solution? Have you tried [st

Re: string to list conversion

2009-02-19 Thread Steve Holden
John Forse wrote: > I need to convert an input string say '' to a list of the form > ['' ,]. If I use list(stringname), I get ['x','x','x','x'] ; > list.join() is an error; and str.join() won't use lists. I do need the > comma after the string. Is there a simple solution? Suppose your inp

string to list conversion

2009-02-19 Thread John Forse
I need to convert an input string say '' to a list of the form ['' ,]. If I use list(stringname), I get ['x','x','x','x'] ; list.join() is an error; and str.join() won't use lists. I do need the comma after the string. Is there a simple solution? Regards John -- http://mail.pytho