No this code is not give any error because we can not try to direct fetch 10th index value so it will not give IndexError
-We use slicing here so that it can't give any error.