def listCompare(*args): res = [] listall = [] for i in range(len(args)): listall += args[i] listall = list(set(listall)) listall.sort() for item1 in listall: reslist = [] reslist.append(item1) for j in range(len(args)): if item1 in args[j]: reslist.append("有") else: reslist.append("無") res.append(reslist) return res