calling upper() on a string, not working?

Felipe Almeida Lessa felipe.lessa at gmail.com
Tue May 16 22:34:39 CEST 2006


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?

>>> ''.join(set('hi'))
'ih'
>>> ''.join(set('HI'))
'IH'
>>> ''.join(set('hiHI'))
'ihIH'
>>> ''.join(set('hiHI'.upper()))
'IH'


-- 
Felipe.




More information about the Python-list mailing list