Home »
Python »
Python Tuples MCQs
What will be the output of the following code? | Tuples Que. 21
21. What will be the output of the following code?
t1=("hello","everyone","include helps","welcomes","you","all")
print(t1[2:4])
- ("everyone", "include helps" ," welcomes", "you")
- ("everyone", "include helps" ," welcomes")
- ("include helps" ," welcomes")
Answer: C) ("include helps" ," welcomes")
Explanation:
The result would be: ("include helps" ," welcomes") , because indexing starts from 0.