df['new']=df[['col1','col2']].apply(lambda x: 1 if len(set(x['col1'].split('|')).intersection(set(x['col2'].split('|')))) >=1 else 0,axis=1)