how leave first and last character from string in python using slicing and dicing code example Example: how to slice a string in python a = 'hello' print(a[1:2])