Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python check if two sets intersect

a = [1, 2, 3]
b = [3, 4, 5]

bool(set(a) & set(b))
Comment

PREVIOUS NEXT
Code Example
Python :: python version 
Python :: pyserial example code 
Python :: genrate unique key in python 
Python :: procfile heroku python example 
Python :: how to add an item to a list in python 
Python :: pandas inplace 
Python :: python get attributes of class 
Python :: multipart/form data multipart encoder python 
Python :: delete rows with value in column pandas 
Python :: sklearn cross_val_score scoring metric 
Python :: changing the current working directory in python 
Python :: open and read a file in python 
Python :: pandas select columns by index 
Python :: is everything in python an object 
Python :: install python 3.6 on centos 
Python :: set http response content type django 
Python :: flask sqlalchemy query specific columns 
Python :: The Python path in your debug configuration is invalid. 
Python :: keras linear regression 
Python :: unicodedecodeerror file read 
Python :: python send http request 
Python :: python exit for loop 
Python :: excel get unique values from column formula 
Python :: python console width 
Python :: py declare type list 
Python :: python pyqt5 sleep 
Python :: drop column pandas 
Python :: transpose matrix numpy 
Python :: python if elif else in one line 
Python :: how to remove numbers from a dataframe in python 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =