Can I use a conditional in a variable declaration?

Grant Edwards grante at visi.com
Sat Mar 18 23:45:22 EST 2006


On 2006-03-19, volcs0 at gmail.com <volcs0 at gmail.com> wrote:

> I want the equivalent of this:
>
> if a == "yes":
>    answer = "go ahead"
> else:
>    answer = "stop"

If that's what you want, then write that. ;)

--
grante at visi.com
Grant Edwards




More information about the Python-list mailing list