Complex compound expressions
Derek Basch
dbasch at yahoo.com
Fri Aug 16 18:15:54 EDT 2002
Hi!,
Just a quick question. I am still a little shaky on
using parentheses to form complex compound
expressions. For example:
if character in string.letters or string.digits:
print 'im a character'
this prints 'im a character' for every character
including digits and whitespaces. I can get the
desired result by using this expression:
if character in string.letters or character in
string.digits:
print 'im a character'
However, I know that there must be a way to use a
parentheses on the top statement and get the same
result. Can anyone help me out here?
Thanks,
Derek Basch
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
More information about the Python-list
mailing list