Re: [Tutor] list slice

2008-09-15 Thread Jerry Hill
On Mon, Sep 15, 2008 at 10:56 AM, Norman Khine <[EMAIL PROTECTED]> wrote: > Hello, > I have this code: > > topics = object.parent.get_topics() >for i, topic in enumerate(topics): >all_previous_topics = topics[:i] >print all_previous_topics > > where topics returns a

[Tutor] list slice

2008-09-15 Thread Norman Khine
Hello, I have this code: topics = object.parent.get_topics() for i, topic in enumerate(topics): all_previous_topics = topics[:i] print all_previous_topics where topics returns a list. I am trying to get all the topics before current topic in the loop. Is ther