51. What will be the output of the following Python code?
a = ('check',)
n = 2
for i in range(int(n)):
a = (a,)
print(a)
a = ('check',)
n = 2
for i in range(int(n)):
a = (a,)
print(a)
52. What will be the output of the following Python code?
>>>my_tuple = (1, 2, 3, 4)
>>>my_tuple.append( (5, 6, 7) )
>>>print len(my_tuple)
>>>my_tuple = (1, 2, 3, 4)
>>>my_tuple.append( (5, 6, 7) )
>>>print len(my_tuple)
53. What will be the output of the following Python code?
>>> a=(1,2,3,4)
>>> del(a[2])
>>> a=(1,2,3,4)
>>> del(a[2])
54. What will be the output of the following Python code?
>>>t = (1, 2, 4, 3, 8, 9)
>>>[t[i] for i in range(0, len(t), 2)]
>>>t = (1, 2, 4, 3, 8, 9)
>>>[t[i] for i in range(0, len(t), 2)]
55. Is the following Python code valid?
>>> a,b=1,2,3
>>> a,b=1,2,3
56. Is the following Python code valid?
>>> a=2,3,4,5
>>> a
>>> a=2,3,4,5
>>> a
57. What will be the output of the following Python code?
>>> a=(1,2,(4,5))
>>> b=(1,2,(3,4))
>>> a<b
>>> a=(1,2,(4,5))
>>> b=(1,2,(3,4))
>>> a<b
58. Is the following Python code valid?
>>> a=(1,2,3)
>>> b=a.update(4,)
>>> a=(1,2,3)
>>> b=a.update(4,)
59. What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:3]
>>>t=(1,2,4,3)
>>>t[1:3]
60. What will be the output of the following Python code?
>>> a=(1,2)
>>> b=(3,4)
>>> c=a+b
>>> c
>>> a=(1,2)
>>> b=(3,4)
>>> c=a+b
>>> c