61. What will be the value of 'result' in following Python program?
list1 = [1,2,3,4]
list2 = [2,4,5,6]
list3 = [2,6,7,8]
result = list()
result.extend(i for i in list1 if i not in (list2+list3) and i not in result)
result.extend(i for i in list2 if i not in (list1+list3) and i not in result)
result.extend(i for i in list3 if i not in (list1+list2) and i not in result)
list1 = [1,2,3,4]
list2 = [2,4,5,6]
list3 = [2,6,7,8]
result = list()
result.extend(i for i in list1 if i not in (list2+list3) and i not in result)
result.extend(i for i in list2 if i not in (list1+list3) and i not in result)
result.extend(i for i in list3 if i not in (list1+list2) and i not in result)
62. Which function is called when the following Python program is executed?
f = foo()
format(f)
f = foo()
format(f)
63. What will be the output of the following Python program?
z=set('abc')
z.add('san')
z.update(set(['p', 'q']))
z
z=set('abc')
z.add('san')
z.update(set(['p', 'q']))
z
64. What will be the output of the following Python expression if x=56.236?
print("%.2f"%x)
print("%.2f"%x)
65. What will be the output of the following Python code snippet?
z=set('abc$de')
'a' in z
z=set('abc$de')
'a' in z
66. Which module in the python standard library parses options received from the command line?
67. What will be the output of the following Python code?
>>>list1 = [1, 3]
>>>list2 = list1
>>>list1[0] = 4
>>>print(list2)
>>>list1 = [1, 3]
>>>list2 = list1
>>>list1[0] = 4
>>>print(list2)
68. What will be the output of the following Python code?
l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))
l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))
69. What will be the output of the following Python code?
x = 'abcd'
for i in range(len(x)):
print(i)
x = 'abcd'
for i in range(len(x)):
print(i)
70. What will be the output of the following Python statement?
>>>"a"+"bc"
>>>"a"+"bc"