Q. What would be the output of following code if ntpl = ("Hello", "Nita", "How's", "life?")


(a, b, c, d) = ntpl

print ( "a is:", a)

print("b is:", b)

print("c is:", c)

print("d is:", d)

ntpl = (a, b, c, d)

print (ntpl[0][0] + ntpl[1][1], ntpl[1])



Answer =

a is: Hello
b is: Nita
c is: How's
d is: life?
Hi Nita
>>>

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. In last line only Nita would be output

    ReplyDelete
    Replies
    1. You are worng. Please check it in your Python.

      Delete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post