str = 'the little dinosaur'
# format: string_name[start_pos_incl:stop_pos_excl]
# zero-based index
# the little...
# 0123456789...
print str[4:]
# >>> little dinosaur
print str[4:10]
# >>> little
# negative index:
# count from the end of str, with -1 being the last position
print str[:-4]
# >>> the little dino
print str[-4:]
# >>> saur
c3RyID0gJ3RoZSBsaXR0bGUgZGlub3NhdXInCiMgZm9ybWF0OiBzdHJpbmdfbmFtZVtzdGFydF9wb3NfaW5jbDpzdG9wX3Bvc19leGNsXQojIHplcm8tYmFzZWQgaW5kZXgKIyB0aGUgbGl0dGxlLi4uCiMgMDEyMzQ1Njc4OS4uLgpwcmludCBzdHJbNDpdCiMgPj4+IGxpdHRsZSBkaW5vc2F1cgpwcmludCBzdHJbNDoxMF0KIyA+Pj4gbGl0dGxlCiMgbmVnYXRpdmUgaW5kZXg6IAojIGNvdW50IGZyb20gdGhlIGVuZCBvZiBzdHIsIHdpdGggLTEgYmVpbmcgdGhlIGxhc3QgcG9zaXRpb24KcHJpbnQgc3RyWzotNF0KIyA+Pj4gdGhlIGxpdHRsZSBkaW5vCnByaW50IHN0clstNDpdCiMgPj4+IHNhdXI=