I have tried and errored a reasonable amount of times
Seymore4Head at Hotmail.invalid
Tue Sep 2 18:59:04 CEST 2014
On Tue, 2 Sep 2014 16:43:09 +0000 (UTC), Grant Edwards
<invalid at invalid.invalid> wrote:
>On 2014-08-30, Tim Chase <python.list at tim.thechases.com> wrote:
>> On 2014-08-30 14:27, Seymore4Head wrote:
>>> I really tried to get this without asking for help.
>>> mylist = ["The", "earth", "Revolves", "around", "Sun"]
>>> print (mylist)
>>> for e in mylist:
>>> # one of these two choices should print something. Since neither
>>> does, I am missing something subtle.
>>> if e.isupper == False:
>>> print ("False")
>>> if e.isupper == True:
>>> print ("True")
>>> I am sure in the first , third and fifth choices should be true.
>>> Right now, I am just testing the first letter of each word.
>> There's a difference between e.isupper which refers to the method
>> itself, and e.isupper() which then calls that method. Call the
>> method, and you should be good to go.
>I missed the beginning of the thread, but Why are you comparing things
>to True and False?
>What you should do is
> if not e.isupper():
> if e.isupper():
I wasn't really comparing it to True. I was trying to use it as a
line of code, but since it wasn't working I just tried that to test
Since neither one was working, I knew something was wrong.
BTW I am very new to Python.
More information about the Python-list