Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    I think if you want to use this method myString[offset:][:length] in the case of OP you can just use myString[offset:][:] Commented Mar 12, 2019 at 22:49
  • 1
    @VictorVal The answer is for those (like me) who have learned Python as a 2nd (3rd, 4th, ...) programming language and want to some familiar 'syntax hooks' to approach the language. Any experts in the language will most likely view my answer as a bit silly. Commented Mar 12, 2019 at 22:58
  • Should answers like this be flagged for deletion? Other answers explain similar solution much better, and seeing this one had made me scratch my head and lookup python for few minutes before realising that it's just that type answer. Commented Jun 12, 2019 at 8:10

lang-py