[Tutor] If then else question

Dustin Mitchell dustin at ywlcs.org
Wed Jun 14 20:51:20 CEST 2006


-----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':
>
>
> The line works but it is a little ungainly.
>
> Anyone have a better way of accomplishing the same thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEkFqydiVAPX8NFbERAl03AKCSkXjFB1bA0xUo4Tf8wNF462DllQCg37ir
iu+TIlJst9AjjN0Qz3rijPU=
=FF5s
-----END PGP SIGNATURE-----



More information about the Tutor mailing list