242. Valid Anagram

242. Valid Anagram

题目:
https://leetcode.com/problems/valid-anagram/

难度 : Easy

对Python来说,又是一块蛋糕,不本地测试
就是这么自信

class Solution(object):
    def isAnagram(self, s, t):
        """
        :type s: str
        :type t: str
        :rtype: bool
        """
        sList = sorted(list(s))
        tList = sorted(list(t))
        return sList == tList
            

你可能感兴趣的:(242. Valid Anagram)