Re: Python lists

2012-12-30 Thread Hans Mulder
On 30/12/12 23:25:39, Evan Driscoll wrote: > On 12/30/2012 4:19 PM, Hans Mulder wrote: >> If it's okay to modify the original list, you can simply do: >> >> l[0] = split(l[0], ", ") >> >> If modifying the original is not okay, the simple solution would >> be to copy it first: >> >> l2 = l >> l2[0]

Re: Re: Python lists

2012-12-30 Thread Evan Driscoll
On 12/30/2012 4:19 PM, Hans Mulder wrote: > If it's okay to modify the original list, you can simply do: > > l[0] = split(l[0], ", ") > > If modifying the original is not okay, the simple solution would > be to copy it first: > > l2 = l > l2[0] = split(l2[0], ", ") Um, that doesn't copy the lis

Re: Python lists

2012-12-30 Thread Hans Mulder
On 28/12/12 18:46:45, Alex wrote: > Manatee wrote: > >> On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: >>> I read in this: >>> >>> ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', >>> '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', >>> 'Digi-Key',

Re: Python lists

2012-12-28 Thread Alex
Manatee wrote: > On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: > > I read in this: > > > > ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', > > '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', > > 'Digi-Key', '490-1521-1-ND', ''] > > > > > > >

Re: Python lists

2012-12-28 Thread Manatee
On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: > I read in this: > > ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', > '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', > '490-1521-1-ND', ''] > > > > Then I need to convert it to thi

Re: Python lists

2012-12-28 Thread Roy Smith
In article <8f5cfb99-d1d7-42d7-858a-89dd23cd5...@googlegroups.com>, Manatee wrote: > I read in this: > ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', > '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', > '490-1521-1-ND', ''] > > Then I need to co

Re: python lists and newline character

2008-07-28 Thread Gary Josack
Gary Herron wrote: Support Desk wrote: Hello all, I am using os.popen to get a list returned of vpopmail users, something like this x = os.popen('/home/vpopmail/bin/vuserinfo -n -D mydomain.com).readlines() x returns a list, of usernames, and I am trying to append the

Re: python lists and newline character

2008-07-28 Thread Gary Herron
Support Desk wrote: Hello all, I am using os.popen to get a list returned of vpopmail users, something like this x = os.popen('/home/vpopmail/bin/vuserinfo -n -D mydomain.com).readlines() x returns a list, of usernames, and I am trying to append the usernames with the do

Re: python lists and newline character

2008-07-28 Thread Stephen Johnson
domain.strip() Assuming domain is the string with the newline. -Steve Johnson On Jul 28, 2008, at 1:32 PM, Support Desk wrote: Hello all, I am using os.popen to get a list returned of vpopmail users, something like this x = os.popen('/home/vpopmail/bin/vuserinfo -n -D mydomai