class Solution: def canConstruct(self, ransomNote: str, magazine: str) -> bool: try: magazine = list(magazine) for i in ransomNote: if i in magazine: magazine.remove(i) else: return False return True except Exception as e: print(e)
class Solution: def canConstruct(self, ransomNote: str, magazine: str) -> bool: try: magazine = list(magazine) for i in ransomNote: if i in magazine: magazine.remove(i) else: return False return True except Exception as e: print(e)
We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.