Update 0383.赎金信.md

This commit is contained in:
jianghongcheng
2023-05-05 21:06:23 -05:00
committed by GitHub
parent 38bc7021c6
commit 1bc667eccd

View File

@ -206,6 +206,7 @@ class Solution:
class Solution: class Solution:
def canConstruct(self, ransomNote: str, magazine: str) -> bool: def canConstruct(self, ransomNote: str, magazine: str) -> bool:
return all(ransomNote.count(c) <= magazine.count(c) for c in set(ransomNote)) return all(ransomNote.count(c) <= magazine.count(c) for c in set(ransomNote))
``` ```
Go Go