[Chicago] Making a list of strings
ccf3 at mindspring.com
Mon Oct 19 20:35:28 CEST 2009
If you wanted to create a list with one element, a string, then perhaps:
Is that what you are getting at?
Phil Robare wrote:
> OK fellow pythonistas, can anyone explain what is going on here?
> I'm using a recent, but not most recent, version of Python.
> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
> I want a list with a string value in it. I make a sample string to
> put in a list.
> In : s='string'
> The obvious way gives me something different but expected
> In : list(s)
> Out: ['s', 't', 'r', 'i', 'n', 'g']
More information about the Chicago