True of False

skulka3 at gmail.com skulka3 at gmail.com
Thu Sep 27 12:45:24 EDT 2007


On Sep 27, 11:33 am, kou... at hotmail.com wrote:
> I tried writing a true and false If statement and didn't get
> anything?  I read some previous posts, but I must be missing
> something.  I just tried something easy:
>
> a = ["a", "b", "c", "d", "e", "f"]
>
> if "c" in a == True:
>      Print "Yes"
>
> When I run this, it runs, but nothing prints.  What am I doing wrong?
> Thanks.
>
> Kou

,
You may want to include paren around ("c" in a) and a lower case p for
Print, i.e. print, and  it should work

so eg:
a = ["a", "b", "c", "d", "e", "f"]

 if ("c" in a) == True:
      print "Yes"




More information about the Python-list mailing list