Computer Science, asked by jayashreevirgo, 11 months ago

What will be the output of the following python code?
a=(1,2,4,3)
print (a[1:4])

Answers

Answered by chiefprashant
0

Answer:

Error

Explanation:

There will be an Index error . Since in python index no. starts from zero.

and the list "a" has only four items so the index value of the last item which is "3" will be 3.

So, python will give an error.

Similar questions