In C++ if I were to remove the first character from a string it would look something like:
string s = "myreallylongstring";
s = s.substr(1);
and this would be O(1). [correct me if I'm wrong about that]
However in Python's "immutable string" world, does this code run in O(n)?
s = "myreallylongstring"
s = s[1:]
Would it be any faster if I used a list of chars instead?