diff --git a/tools/tools.py b/tools/tools.py index 94463e7..21e5c0f 100644 --- a/tools/tools.py +++ b/tools/tools.py @@ -85,7 +85,17 @@ def intersection(self, *args) -> list: return list(ret) +@hook(list) +def __and__(self, *args) -> list: + return self.intersection(*args) + + @hook(str) def intersection(self, *args) -> str: ret = set(self).intersection(*args) - return "".join(list(ret)) \ No newline at end of file + return "".join(list(ret)) + + +@hook(str) +def __and__(self, *args) -> str: + return self.intersection(*args) \ No newline at end of file