Help with String Manipulation
DOUGS at oceanic.com
Wed Jun 23 11:17:13 CEST 1999
> From: wtanksle at dolphin.openprojects.net on Tuesday, June 22, 1999 3:26 PM
> Whew! Is there any reason to not use: ... ??
The opportunity to challenge with a reference that I consider a good read?
Actually, I was deliberately much more pedantic than you made me out to be.
>>> testring = "This is an example"
>>> testlist = map (ord, testring)
[84, 104, 105, 115, 32, 105, 115, 32, 97, 110, 32, 101, 120, 97, 109, 112,
I thought made it much more obvious that a transformation happened, where a
newbie might confuse:
>>> x = list("This is an example.")
['T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', 'n', ' ', 'e', 'x', 'a', 'm',
'p', 'l', 'e',
as having not done anything. I know I had that problem as a beginner and
was hoping this would somehow help illustrate mutable and immutable more
More information about the Python-list