如果元素都是数字: # a = [121, 144, 19, 161, 19, 144, 19, 11]# b = [121, 14641, 20736, 361, 25921, 361, 20736, 361]# d=[]# for i in a:# if i not in d:# d.append(i*i)# print(sorted(d))# print(sorted(b))# if sorted(b)==sorted(d): ###排序后,再进行比较# print(True)# else