# -*- coding: utf-8 -*- def containsAny(seq, aset): """ 检查序列seq 是否含有aset 中的项 """ for c in seq: if c in aset: return True return False seq = [1,2,3] aset = [3,4,5] print(containsAny(seq,aset))
# -*- coding: utf-8 -*- def containsAny(seq, aset): """ 检查序列seq 是否含有aset 中的项 """ for c in seq: if c in aset: return True return False seq = [1,2,3] aset = [3,4,5] print(containsAny(seq,aset))