Re: [Tutor] Best Practice: Subroutines and Loop logic

2009-09-03 Thread Alan Gauld
"GoodPotatoes" wrote #logic loop for word in lData: if word in lWords: continue elif sub1(word)[0]=1: word=sub1(word)[1] # <--- Here is my question. else: print word " not found.\n" The subroutine is being run once at the elif statement. I don't want to run it a

Re: [Tutor] Best Practice: Subroutines and Loop logic

2009-09-03 Thread Benno Lang
On Fri, Sep 4, 2009 at 3:29 AM, GoodPotatoes wrote: > Hello, > > I am trying to find the best way to do this.  My goal is to only call this > subroutine only ONCE, and the logic is contingent upon two outputs. > > lWords=[...] # List of many, many words > lData=[...] #list of some words that need t