Newbie 1st program
Nick Jacobson
nicksjacobson at yahoo.com
Tue Aug 17 14:30:27 EDT 2004
> ary = ["Restrict your search to a specific site",
> "army.mil", "usmc.mil", "af.mil", "navy.mil", "uscg.mil",
> "SYColeman.com", "l3com.com", "fedbizopps.gov", "defenselink.mil"]
>
> i = event.GetInt()
> if 0 <= i < len(ary):
> t2.Clear()
> t2.SetValue(ary[i])
> t2.SetEditable(i != 0)
You're right, this is an improvement. Well, my main point was to
eliminate the code redundancy, even if I was a bit clumsy about it. :0
--Nick
More information about the Python-list
mailing list