Home »
Python »
Python Tuples MCQs
What will be the output of the following code? | Tuples Que. 16
16. What will be the output of the following code
T1=("hello","include help",-1)
print(T1[-1])
- Error
- Hello
- -1
Answer: c) -1
Explanation:
Negative index will access the element from the last element there -1 index means the last element of the tuple which means -1 is the answer.