Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

#finding the similarity among two sets and 1 if statement

#finding the similarity among two sets and 1 if statement

set_A= {"Apple", "Orange", "coconut"}
set_B= {"Green","Blue", "Yellow" , "Orange"}
set_c = set_A.intersection(set_B)

for x in set_c:

    print(x)
if "Green" in set_B:
    print("Hello Green Guy")
 
PREVIOUS NEXT
Tagged: #similarity #sets #statement
ADD COMMENT
Topic
Name
4+6 =