examples/strings/string_slice.py
from __future__ import print_function

x = "abcd"
print(x[0])    #  a

print(x[1:3])  #  bc
print(x[2:])   #  cd
print(x[:2])   #  ab

start = 1
end = 3
print(x[start:end]) # bc