In <316efebe-7f54-4054-96b1-51c7bb7b7...@f5g2000vbt.googlegroups.com> ksals <kbsals5...@gmail.com> writes:
> Please help a newbe. I have a string returned from an esygui > multchoicebox that looks like > this: ('ksals', '', 'alsdkfj', '3', '') I need to convert this to > this: ['ksals', '', 'alsdkfj', '3', ''] That looks like a tuple which contains five strings. But you said it's a string, so I'll believe you. >>> x = "('ksals', '', 'alsdkfj', '3', '')" >>> print x ('ksals', '', 'alsdkfj', '3', '') >>> y = "[%s]" % x[1:-1] >>> print y ['ksals', '', 'alsdkfj', '3', ''] -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies" -- http://mail.python.org/mailman/listinfo/python-list