string to list conversion

John Forse johnforse at talktalk.net
Thu Feb 19 13:46:52 CET 2009


I need to convert an input string say 'xxxx' to a list of the form  
['xxxx' ,]. 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






More information about the Python-list mailing list