Beginner question

Chris Down chris at chrisdown.name
Tue Aug 6 17:46:51 EDT 2013


On 2013-08-06 14:35, eschneider92 at comcast.net wrote:
> Why won't the 'goodbye' part of this code work right? it prints 'ok' no
> matter what is typed. Much thanks.

"if" statements do not fall through, because the first statement was matched,
no other ones in the same chain will be evaluted.

"elif" means "else if", where "else" means "if nothing previous matched".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20130806/387b87f5/attachment.sig>


More information about the Python-list mailing list