Report Bug

Qus

What will be the output of the following Python code?

s={4>3, 0, 3-3}

all(s) 

any(s)

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


A. True False
B. False True
C. True True
D. False False


Solution
B. False True



Explanation
The function all returns true only if all the conditions given are true. But in the example shown above, we have 0 as a value. Hence false is returned. Similarly, any returns true if any one condition is true. Since the condition 4>3 is true, true is returned.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad