Well, I got a situation where I needed to translate a PHP script to Python, and it had many usages of substr(string, beginning, LENGTH)
.
If I chose Python's string[beginning:end]
I'd have to calculate a lot of end indexes, so the easier way was to use string[beginning:][:length]
, it saved me a lot of trouble.