Just a quick one

infidel saint_infidel at hotmail.com
Wed Aug 25 16:16:52 EDT 2004


"M. Clift" <noone at here.com> wrote in message news:<cgi5vc$m52$1 at news7.svr.pol.co.uk>...
> Hi Benjamin,
> 
> Sorry, another question. How do I remove the brackets form the list?
> Name_List.remove('(') doesn't work.

The brackets or parentheses are not part of the list or tuple, they
are part of the string representation of the list or tuple.

If you want to turn the list ('Bob', 'Mary') into the string 'Bob,
Mary', use:

', '.join(('Bob', 'Mary'))

-infi



More information about the Python-list mailing list