Re: Delete all list entries of length unknown

2009-10-11 Thread r
On Oct 4, 11:05 pm, "Mark Tolonen" wrote: > "Chris Rebert" wrote in message > > Tuples are immutable (i.e. they cannot be modified after creation) and > > are createdusingparentheses. > > Slight correction: tuples are createdusingcommas.  Parentheses are only > needed to disambiguate from other u

Re: Delete all list entries of length unknown

2009-10-05 Thread flebber
On Oct 5, 3:05 pm, "Mark Tolonen" wrote: > "Chris Rebert" wrote in message > > news:50697b2c0910042047i1cf2c1a3mc388bc74bab95...@mail.gmail.com... > > > Tuples are immutable (i.e. they cannot be modified after creation) and > > are created using parentheses. > > Slight correction: tuples are crea

Re: Delete all list entries of length unknown

2009-10-04 Thread Mark Tolonen
"Chris Rebert" wrote in message news:50697b2c0910042047i1cf2c1a3mc388bc74bab95...@mail.gmail.com... Tuples are immutable (i.e. they cannot be modified after creation) and are created using parentheses. Slight correction: tuples are created using commas. Parentheses are only needed to disam

Re: Delete all list entries of length unknown

2009-10-04 Thread r
On Oct 4, 10:09 pm, flebber wrote: > Hi > > Can someone clear up how I can remove all entries of a list when I am > unsure how many entries there will be. Sure...! >>> a = range(10) >>> a [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> del a[0] >>> a [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> del a[-1] >>> a [1, 2, 3,

Re: Delete all list entries of length unknown

2009-10-04 Thread Chris Rebert
On Sun, Oct 4, 2009 at 8:09 PM, flebber wrote: > Hi > > Can someone clear up how I can remove all entries of a list when I am > unsure how many entries there will be. I have been using sandbox to > play essentially I am creating two lists a and b I then want to add a > to b and remove all b entrie

Delete all list entries of length unknown

2009-10-04 Thread flebber
Hi Can someone clear up how I can remove all entries of a list when I am unsure how many entries there will be. I have been using sandbox to play essentially I am creating two lists a and b I then want to add a to b and remove all b entries. This will loop and b will receive new entries add it to