Bug in slicing for python 3

name = "yashasvi"

This code in codechef compiler gives result “yash”, it should give result “yas”.
According to the documentation of python.

In programming language counting always start from 0 . If you want to slice down first three alphabets of yashasvi try this

I don’t think there’s any bug.

its correct , bcz when slicing a[0:3]
it includes the 0th index and excludes 3rd index
that’s why it gives result up to index 2

Okay, got it, thank you everyone