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
>>>
In last line only Nita would be output
ReplyDeleteYou are worng. Please check it in your Python.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )