Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:3]

What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:3]
a) (1, 2)
b) (1, 2, 4)
c) (2, 4)
d) (2, 4, 3)

Answer: c
Explanation: Slicing in tuples takes place just as it does in strings.

Join The Discussion