Paul's Programming Notes     Archive     Feed     Github

Something I Need To Drill Into My Brain - Python

The operation of the slicing operator:
>>> word[:2]    # The first two characters
'He'
>>> word[2:] # Everything except the first two characters
'lpA'