-
-
Save IndhumathyChelliah/5ff5583b11a74c7ad193440ce2fd8a7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If all items in set is True | |
s1={1,2,3} | |
print(all(s1)) #Output:True | |
print(any(s1)) #Output:True | |
#If set is empty | |
s2=set() | |
print (all(s2)) #Output:True | |
print(any(s2))#Output:False | |
#If one item in set is False | |
s3={1,0} | |
print (all(s3))#Output:False | |
print (any(s3))#Output:True | |
#If all items in set is False | |
s4={0,False} | |
print (all(s4))#Output:False | |
print (any(s4))#Ouput:False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment