Run
string1 = 'hello-world' stop = 5 #end position slice_object = slice(stop) result = string1[slice_object] print(result)
Output