Report Bug
Qus :

What will be the output of the following Python code?

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

Qus

निम्नलिखित 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


Solution
B. Error, unsupported operand ‘+’ for sets



Explanation
TypeError: unsupported operand type(s) for +: 'set' and 'set'



Report Bug