Skip to content

Question 18

What is the output of the following code?

tup2 = (1,2,3,4,5,6,7,8,9,10)
print(tup2[4:])
Solution

The result is a collection of elements beginning from index 4 onwards, meaning starting from value 5 in tup2.

Answer
(5, 6, 7, 8, 9, 10)