2 ms·
Good catch. Counter(str1) - Counter(str2) | Counter(str2) - Counter(str1) That ought to work. I'd hope Python's caching doesn't recompute the Counter for lon
by BeFlatXIII 2y ago
Good catch.
Counter(str1) - Counter(str2) | Counter(str2) - Counter(str1)
That ought to work. I'd hope Python's caching doesn't recompute the Counter for long strings.