Re: [Tutor] If then else question

2006-06-14 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Robert > Sent: Wednesday, June 14, 2006 12:41 PM > To: Python Tutor > Subject: [Tutor] If then else question > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 &g

Re: [Tutor] If then else question

2006-06-14 Thread Dustin Mitchell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 How about .. elif ch_val in ('040', '011', '012'): .. On Jun 14, 2006, at 1:40 PM, Andrew Robert wrote: > In the middle of an if then else, I have the following line > > elif ch_val == '040' or ch_val == '011' or ch_val == '012':

Re: [Tutor] If then else question

2006-06-14 Thread Kent Johnson
Andrew Robert wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi Everyone, > > In the middle of an if then else, I have the following line > > elif ch_val == '040' or ch_val == '011' or ch_val == '012': > > > The line works but it is a little ungainly. > > Anyone have a bet

Re: [Tutor] If then else question

2006-06-14 Thread Jason Massey
How about:elif ch_val in ['040','011','012']:On 6/14/06, Andrew Robert <[EMAIL PROTECTED] > wrote:-BEGIN PGP SIGNED MESSAGE-Hash: SHA1Hi Everyone, In the middle of an if then else, I have the following lineelif ch_val == '040' or ch_val == '011' or ch_val == '012':The line works but

Re: [Tutor] If then else question

2006-06-14 Thread Andrew Robert
Sent: Wednesday, June 14, 2006 12:41 PM >> To: Python Tutor >> Subject: [Tutor] If then else question >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Hi Everyone, >> >> In the middle of an if then else, I have the following line >

[Tutor] If then else question

2006-06-14 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Everyone, In the middle of an if then else, I have the following line elif ch_val == '040' or ch_val == '011' or ch_val == '012': The line works but it is a little ungainly. Anyone have a better way of accomplishing the same thing? -