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 list slicing 
Python :: python create list from range 
Python :: python sentence splitter 
Python :: generate new secret key django 
Python :: pandas create a calculated column 
Python :: loop through list of tuples python 
Python :: how to get the current year in python 
Python :: convert index of a pandas dataframe into a column 
Python :: deleting dataframe row in pandas based on column value 
Python :: where are python libraries installed in windows 
Python :: boto3 read excel file from s3 into pandas 
Python :: find common values in different dataframes pandas 
Python :: pandas select columns by index list 
Python :: convert string to integer in dictionary python 
Python :: install python in centos7 
Python :: create spark dataframe from pandas 
Python :: how store list in django session 
Python :: xa python 
Python :: python series get value 
Python :: close python window after execution 
Python :: django radio button 
Python :: flask flash not working 
Python :: pygame.rect 
Python :: pandas dataframe read string as date 
Python :: remove a column from dataframe 
Python :: convert price to float python 
Python :: python letter to number in alphabet 
Python :: filter pandas dataframe 
Python :: python checking if something is equal to NaN 
Python :: groupby count pandas 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =