human
I found an interesting problem on https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters/:
Given an array of strings arr. String s is a concatenation of a sub-sequence of arr which have unique characters.
Return the maximum possible length of s.
 
Example 1:
Input: arr = ["un","iq","ue"]
Output: 4
Explanation: All possible concatenations are "","un","iq","ue","uniq" and "ique".
Maximum length is 4.

Example 2:
Input: arr = ["cha","r","act","ers"]
Output: 6
Explanation: Possible solutions are "chaers" and "acters".

Example 3:
Input: arr = ["abcdefghijklmnopqrstuvwxyz"]
Output: 26

 
Constraints:

1 <= arr.length <= 16
1 <= arr[i].length <= 26
arr[i] contains only lower case English letters.

I tried it in Python, but could not do it. Can you solve it?

Give me a the Python code you requested?
assistant
#Here is the Python code you requested.

from collections import Counter
class Solution:
    def maxLength(self, arr: List[str]) -> int:
        max_str = 0
        for i in range(len(arr)):
            if self.is_unique(arr[i]) and len(arr[i]) > max_str:
                max_str = len(arr[i])
            
            concat = [arr[i]]
            for j in range(i+1, len(arr)):
                for x in concat:
                    c = x + arr[j]
                    if self.is_unique(c):
                        if len(c) > max_str:
                            max_str = len(c)
                        concat.append(c)
        return max_str
            
        
    def is_unique(self, str):
        for v in Counter(str).values():
            if v > 1:
                return False
        return True