stu1=[“x”,“y”,“z”] b=[“x”,“y”,“z”] fa=[“x”] fc=[“x”,“z”] ta=[] tb=[] tc=[] for i in range (len (stu1)): if stu1[i] not in fa: h=stu1[i] ta.append(h) for i in range (len (stu1)): if stu1[i] not in fc: g=stu1[i] tc.append(g) for i in range(len(stu1)): for j in range (len (stu1)): if stu1[i] in ta and stu1[j] in tc and \ stu1[i]!=stu1[j]: a=stu1[i] c=stu1[j] b.remove(a) b.remove© b= ‘’ .join(b) print(“a的比赛对象是:”,a) print(“b的比赛对象是:”,b) print(“c的比赛对象是:”,c)