Learing Python, Newbie question
Mikael Olofsson
mikael at isy.liu.se
Fri Oct 26 02:31:51 EDT 2001
On 26-Oct-2001 Greg Ewing wrote:
> If you mean "shorter", "cuter", "more cryptic", etc.
> you could use
>
> db_flag = "wa"[db_first]
>
> provided db_first is known to be either 0 or 1.
And if db_first is not known to be either 0 or 1, you could do
db_flag = "aw"[not db_first]
/Mikael
-----------------------------------------------------------------------
E-Mail: Mikael Olofsson <mikael at isy.liu.se>
WWW: http://www.dtr.isy.liu.se/dtr/staff/mikael
Phone: +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date: 26-Oct-2001
Time: 08:29:33
/"\
\ / ASCII Ribbon Campaign
X Against HTML Mail
/ \
This message was sent by XF-Mail.
-----------------------------------------------------------------------
Linköpings kammarkör: www.kammarkoren.com
More information about the Python-list
mailing list