calling upper() on a string, not working?

John Salerno johnjsal at NOSPAMgmail.com
Tue May 16 16:41:02 EDT 2006


Felipe Almeida Lessa wrote:
> Em Ter, 2006-05-16 às 20:25 +0000, John Salerno escreveu:
>> it doesn't seem to work. The full code is below if it helps to understand.
> 
> Why doesn't it work? What does it do, what did you expect it to do?

If you run the whole script with the first line (the one not commented), 
you get output similar to this, which is correct:

 >>>
["AMN RIPQ LP WOQ SNIS. BW VIDQ, LQ'P WOQ NHNW RIPQ.", 'ULJJLIY TIZJXWNE']
 >>>

But if you use the line with the upper() call, you get this:

 >>>
["Bhe past is not dead. Dn fact, it's not even past.", 'Killiam Qaulkner']
 >>>

Now, I know the actual upper() function works, but I can't understand if 
there's a problem with *when* it's being called, or what's being done 
with it to get the second result above.



More information about the Python-list mailing list