how to stop slicing a string at a certain symbol in python code example Example: how to slice a string in python a = 'hello' print(a[1:2])