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.