MyHaz wrote:
''.join(['Thank ','you])
^^ Syntax error ...
Probably better as:
' '.join(['Thank', 'you'])
;)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
This Is A Late Cross Post from comp.lang.python. It seems the mistery
is deeper then i expected.
What is the running time of conactination on character strings.
i.e.
joe=123
joe+=9
is it Amortized Constant time? I don't think it would be O((number of
chars)^2) but i really
Edg Bamyasi wrote:
What is the running time of conactination on character strings.
i.e.
joe=123
joe+=9
is it Amortized Constant time? I don't think it would be O((number of
chars)^2) but i really don't know.
Strings are immutable, so
joe+=9
is executed as
joe =
Edg Bamyasi schrieb:
What is the running time of conactination on character strings.
i.e.
.joe=123
.joe+=9
is it Amortized Constant time? I don't think it would be O((number of
chars)^2) but i really don't know.
First of all, this idiom is generally avoided in loops (where it
Thanks Guys It Was Great Help and I have began to mark my code for the
''.join() string conatination optimization. Upon regoogling (when you
know the right thing to google it can make a big diffrence, having not
know how to google +=, hehe). I found this commentary and set of tests.
I find it a