Python Easy Top 99.4% Runtime
Upvote for a cookie\n\n---\n\nBy enumerating the letters, instead of performing a costly set(s), and using str.count() built-in method we can decrease the runti
**Upvote for a cookie**\n\n---\n\nBy enumerating the letters, instead of performing a costly `set(s)`, and using `str.count()` built-in method we can decrease the runtime significantly.\n\n```\nclass Solution:\n    def isAnagram(self, s: str, t: str) -> bool:\n        flag = True\n        if len(s) != len(t): \n            flag = False\n        else:\n            letters = "abcdefghijklmnopqrstuvwxyz"\n            for letter in letters:\n                if s.count(letter) != t.count(letter):\n                    flag = False\n                    break\n        return flag\n```\n\n\n![image](https://assets.leetcode.com/users/images/580d76b7-6be2-4770-9f53-efb4f739368a_1660756451.28268.png)\n\n---\n\n**Please, leave any comments or improvements below!**
['Python', 'Python3']