►
Run
stop = 3 slice_object = slice(stop) x = 'abcdefgh' print(x[slice_object])
Output