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])
  1. ("everyone", "include helps" ," welcomes", "you")
  2. ("everyone", "include helps" ," welcomes")
  3. ("include helps" ," welcomes")

Answer: C) ("include helps" ," welcomes")

Explanation:

The result would be: ("include helps" ," welcomes") , because indexing starts from 0.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.