NIELIT O Level Exam

<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">a={5,6,7,8}<br></span><span style="font-size: 14px;">b={7,8,9,10}&nbsp;<br></span><span style="font-size: 14px;">print(len(a+b))</span></pre>

What will be the output of the following Python code?

a={5,6,7,8}
b={7,8,9,10} 
print(len(a+b))


निम्नलिखित Python कोड का आउटपुट क्या होगा?

a={5,6,7,8}
b={7,8,9,10} 
print(len(a+b))

A. 8

B. Error, unsupported operand ‘+’ for sets

C. 6

D. Nothing is displayed कुछ भी डिस्प्लेड नहीं है




Correct Answer is :

B. Error, unsupported operand ‘+’ for sets



Explanation
TypeError: unsupported operand type(s) for +: 'set' and 'set'
Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad