Thanks again, Eric!
But seems a slight misunderstanding goes here. Of course I'm not
going to mute the immutable strings, but only their copies...
To clear the whole thing, this is where my "trouble" origins from:
http://spoj.sphere.pl/problems/PALIN/
I'm just trying to advocate for Python...
Given a very long (e.g. len()=10^12) string of digits:
e.g., s='23426994030208483858........38838299459942'
What I need is just to increase by 1 this string-number: '12347'+'1'='12348'.
(Note the "terrible" case: '9999'+'1'='10000')
But seems that s=str(long(s)+1) is quite expensive way to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.