def anagrams(self, strs): # write your code here L = [i if len(i) <= 1 else sorted(i) for i in strs] return [strs[i] for i in range(len(L)) if L.count(L[i]) > 1]
标签:ret def self class blog return sort gpo log
def anagrams(self, strs): # write your code here L = [i if len(i) <= 1 else sorted(i) for i in strs] return [strs[i] for i in range(len(L)) if L.count(L[i]) > 1]
标签:ret def self class blog return sort gpo log
原文地址:https://www.cnblogs.com/tingway/p/8543991.html