On Jun 5, 7:41 am, Jeff Nyman <[EMAIL PROTECTED]> wrote:
> DC_List = ['Baltimore', 'Birmingham', 'Cincinnati', 'Cleveland',
> LosAngeles']
>
> (Each element in the DC_List is actually a full directory path, but I
> shortened that in the interest of clarity.)
>
> The problem is that I need to pass this list to a list control in a
> wxWidgets application. In order to do that, I need to pass in a list
> like this:
>
> [ ('Baltimore', ''), ('Birmingham', ''), ('Cincinnati', ''),
> ('Cleveland', ''), ('LosAngeles', '') ]
>

tupleized_city_list = [ (city,'') for city in DC_list ]

-- Paul


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to