Chris: See below.
> -----Original Message----- > Message: 7 > Date: Fri, 27 Oct 2006 12:20:51 -0700 > From: "Chris Hengge" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Why is this only catching one occurance? > To: "Bob Gailer" <[EMAIL PROTECTED]> > Cc: Tutor <tutor@python.org> > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > I've tried to use your example: > for unWantedItem in directoryList[,,-1]: > > but I get an error: > for unWantedItem in directoryList[,,-1]: > ^ > SyntaxError: invalid syntax > <<SNIP>> The problem is the commas. Python uses colons to describe slices. Try this instead: >>>>> for unWantedItem in directoryList[::-1]: I think that will work for you. Regards, Barry [EMAIL PROTECTED] 541-302-1107 ________________________ We who cut mere stones must always be envisioning cathedrals. -Quarry worker's creed _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor