算法-目录
题目来源:Leetcode 383. 赎金信
class Solution(object):
def canConstruct(self, ransomNote, magazine):
"""
:type ransomNote: str
:type magazine: str
:rtype: bool
"""
b=set(ransomNote)
for i in b:
if ransomNote.count(i)>magazine.count(i):
return False
return True