Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

if statement in python with sets

#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")
Comment

PREVIOUS NEXT
Code Example
Python :: Site Download Python3 
Python :: flask example 
Python :: #clearing all keys new key in python 
Python :: mkvirtualenv 
Python :: pytorch get intersection between two masks 
Python :: is reversed a generator python 
Python :: plotly change marker symboly sequence 
Python :: select nth item from list 
Python :: point at the middle of a dataframe 
Python :: add service files in setup.py ROS2 
Python :: What is the expected value of print to this program X = 2 Y = 3 Z = X + Y print(Y) #Z 
Python :: loop through dataframe and assign values based on previous row 
Python :: add constant to all values of columns in dataframe python 
Python :: how to add numbers in a list python 
Python :: python record screen and audio 
Python :: geopandas clipping 
Python :: how to keep old content when using write in python 
Python :: ORing two cv mat objects 
Python :: how to put words into list 
Python :: python tags 
Python :: paramhans ramchandra das 
Python :: matplotlib plt.sapect 
Python :: python time range monthly 
Python :: aiml python install 
Python :: auto instagram login 
Python :: conversion of int to a specified base number 
Python :: how to create simple window in wxPython 
Python :: pytorch rolling window 
Python :: how to join models from another app 
Python :: how to run function when file is modified python 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =