The Running Time of +=

MyHaz support.services.complaints at gmail.com
Tue Mar 22 12:22:19 EST 2005


What is the running time of conactination on character strings.

i.e.

>> joe="123"
>> joe+="99999999999999999"


is it Amortized Constant time? I don't think it would be O((number of
chars)^2) but i really don't know.

Teach me how to fish, where would i find out more about the internal
representations of data types in python (and guarenteed run times, im
think of something like sgi.com 's info on the STL) . I have looked
through the docs but i don't seem to see these types of specifications.


thanks * 100
- Haz




More information about the Python-list mailing list