youtoo wrote:
It has been extensively discussed the time complexity (quadratic) of string concatenation (due to string's immutability). But what is: == the time complexity of string indexing? Is it constant? == the time complexity of string slicing? Is it O(K) with K the slice's length? How are strings stored in Python? As arrays? As linked lists?
There is a Py wiki page on such issues. A wiki search should find it. -- http://mail.python.org/mailman/listinfo/python-list