Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #52087

Re: Beginner question

Date 2013-08-06 23:46 +0200
From Chris Down <chris@chrisdown.name>
Subject Re: Beginner question
References <6e80b2f8-0b14-43cd-b8af-211ef65d73ba@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.284.1375832602.1251.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 2013-08-06 14:35, eschneider92@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".

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Beginner question eschneider92@comcast.net - 2013-08-06 14:35 -0700
  Re: Beginner question Dave Angel <davea@davea.name> - 2013-08-06 22:03 +0000
  Re: Beginner question Chris Angelico <rosuav@gmail.com> - 2013-08-06 23:10 +0100
  Re: Beginner question "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-08-06 23:14 +0100
  Re: Beginner question Chris Down <chris@chrisdown.name> - 2013-08-06 23:46 +0200
  Re: Beginner question eschneider92@comcast.net - 2013-08-06 20:06 -0700

csiph-web