[Pythonmac-SIG] dumping characters into a list

Sheila King sheila at thinkspot.net
Sat Jan 21 07:01:58 CET 2006


--On January 20, 2006 8:26:44 PM -0800 Bob Ippolito <bob at redivi.com> wrote:

> You don't need that intermediate list, strings are iterable.

No, you don't. I was just sort of thinking out loud here on the list...only 
solved half of his problem on the first round.

This certainly works too:
>>> map(ord, s)
[84, 104, 105, 115, 32, 105, 115, 32, 97, 32, 115, 116, 114, 105, 110, 103, 
46]
>>>

-- 
Sheila King
sheila at thinkspot.net
http://www.thinkspot.net/sheila/




More information about the Pythonmac-SIG mailing list