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?
>>> a=(1,2,3,4)
>>> del(a[2])

What will be the output of the following Python code?
>>> a=(1,2,3,4)
>>> del(a[2])
a) Now, a=(1,2,4)
b) Now, a=(1,3,4)
c) Now a=(3,4)
d) Error as tuple is immutable

Answer: d
Explanation: tuple’ object doesn’t support item deletion.

Join The Discussion