python 字符串包含判断 a = '123aaa456' b = '123456' if set(a)& set(b)==set(b): print("a包含b") else: print("a不包含b")