[Tutor] If then else question
Jason Massey
jason.massey at gmail.com
Wed Jun 14 20:50:00 CEST 2006
How about:
elif ch_val in ['040','011','012']:
On 6/14/06, Andrew Robert <andrew.arobert at gmail.com> 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 better way of accomplishing the same thing?
>
>
> - --
> Thank you,
> Andrew Robert
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> Comment: GnuPT 2.7.2
>
> iD8DBQFEkFgfDvn/4H0LjDwRAophAKCZbJaMWBr2G8dLjHO3VtOA98/+1gCbBsys
> 4B/Q6g9m+3DW+PzcnCpki6k=
> =t0E4
> -----END PGP SIGNATURE-----
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060614/3370a503/attachment.html
More information about the Tutor
mailing list