Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77235

Re: When does True == True

References <hf4vv9d552irjamu61rtp1t4hut17c525u@4ax.com>
Date 2014-08-28 16:57 -0400
Subject Re: When does True == True
From Joel Goldstick <joel.goldstick@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.13580.1409259464.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Aug 28, 2014 4:45 PM, "Seymore4Head" <Seymore4Head@hotmail.invalid>
wrote:
>
> import math
> import random
> import sys
> pigword="Razzamattaz"
> print ("Pig Latin")
> print ("Pick a word containing only alphabetical characters",pigword)
> if len(pigword) > 0:
>     print (pigword)
> else:
>     print ("empty")
> if pigword.isalpha() == "True":
>     print (pigword)
>     print ("True")
> else:
>     print ("WTF")
> print(pigword.isalpha())
>
> What am I doing wrong?
"True" is not True
>
> pigword isalpha
> the test for true should have passed.
> The test for true din't pass even though it prints pigword.isalpha()
> True after the else statment.
> --
> https://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

When does True == True Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-28 16:38 -0400
  Re: When does True == True Andrew Berg <aberg010@my.hennepintech.edu> - 2014-08-28 15:52 -0500
    Re: When does True == True Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-28 16:53 -0400
  Re: When does True == True Joel Goldstick <joel.goldstick@gmail.com> - 2014-08-28 16:57 -0400

csiph-web