language-icon Old Web
English
Sign In

Python String Slicing

2020 
Python slice syntax is nothing new. We find such syntax in other programming languages. However, string slicing in Python is usually covered briefly in standard references, Python textbooks as well as favorite websites. In this article, the author attempts to explore every nook and cranny of string slicing in Python. Besides proving a string slicing theorem, the author explores the limitation of string slicing expressed in everyday languages, the default values of all three arguments of the slice, the minimal string slice statement, the meaning of negative step, the influence of step on other two arguments, and two suggestions to correctly predict the substring of a slice.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    1
    References
    0
    Citations
    NaN
    KQI
    []