[Tutor] Why isn't my simple if elif script not working?
Alexandre Zani
alexandre.zani at gmail.com
Wed Jul 18 16:34:59 CEST 2012
On Wed, Jul 18, 2012 at 6:09 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> Alexandre Zani wrote:
>
>> What you want to write is this:
>>
>> elif name == "John Cleese" or name == "Michael Palin":
>
>
> elif name in ("John Cleese", "Michael Palin"):
>
> is better.
>
>
> --
> Steven
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
Better how?
More information about the Tutor
mailing list