In <3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com> ksals 
<kbsals5...@gmail.com> writes:

> The original choice looks like this when I print it:

> print(choice)
> ('ksals', '', 'alsdkfj', '3', '')

> I need to submit these as defaults to a multenterbox. Each entry above
> ksals, "", "alsdkfj', 3 , '' need to fill the five fields in the box.
> I tried your suggestion so you must be right it is a tuple of 5
> strings.  But I need them to work in an instruction like
> fieldValues =3D eg.multenterbox(msg1,title, fieldNames, choice)
> fieldNames has 5 fields.

If you just need to convert a tuple to a list, that's easy.  Call the
built-in function list() and pass the tuple as an intializer:

>>> choice = ('ksals', '', 'alsdkfj', '3', '')
>>> print choice
('ksals', '', 'alsdkfj', '3', '')
>>> choice_list = list(choice)
>>> print choice_list
['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

Reply via email to