[Tutor] 'if a==b or a==c or a==d' alternative (was: pausing a nd layout)

alan.gauld@bt.com alan.gauld@bt.com
Mon Jan 6 12:28:48 2003


> I've come to the conclusion that I like the seemingly SQL'ish 
> alternative to the 'if' statement above:
> 
> if p in ('Q','q',''):
>     sys.exit()

Or even:

  if p in 'Qq ':
      sys.exit()

saves a few quote signs...

Alan g.