任务一:Leetcode 383(笔记中提交代码与leetcode提交通过截图)
暴力遍历:
class Solution(object):
def canConstruct(self, ransomNote, magazine):
"""
:type ransomNote: str
:type magazine: str
:rtype: bool
"""
listA = list(ransomNote)
listB = list(magazine)
for char_A in listA:
first_pos = -1
for i in range(len(listB)):
if char_A == listB[i]