Q. What will the following code produce?

 

Tup1 = (1,) * 3

Tup1 [0] = 2

print (Tup1)

 

Answer = 

It will give an error that ‘TypeError: 'tuple' object does not support item assignment’.

Post a Comment

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

Previous Post Next Post